From 084a3c76af44d8d8ced7e66fb8557a82eb252edc Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 15 Sep 2020 12:07:37 +0200 Subject: [PATCH] start with simple RPC for maximum compatibility --- .../java/com/sparrowwallet/sparrow/net/ElectrumServer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java b/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java index 7b3bf12a..a6b46084 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java @@ -605,6 +605,9 @@ public class ElectrumServer { reader.setUncaughtExceptionHandler(ConnectionService.this); reader.start(); + //Start with simple RPC for maximum compatibility + electrumServerRpc = new SimpleElectrumServerRpc(); + List serverVersion = electrumServer.getServerVersion(); firstCall = false; @@ -612,8 +615,6 @@ public class ElectrumServer { if(supportsBatching(serverVersion)) { log.debug("Upgrading to batched JSON-RPC"); electrumServerRpc = new BatchedElectrumServerRpc(); - } else { - electrumServerRpc = new SimpleElectrumServerRpc(); } BlockHeaderTip tip;