diff --git a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/BitcoindClient.java b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/BitcoindClient.java index 73458e22..2934e35f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/BitcoindClient.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/BitcoindClient.java @@ -114,7 +114,7 @@ public class BitcoindClient { tip = blockHeader.getBlockHeader(); timer.schedule(new PollTask(), 5000, 5000); - if(blockchainInfo.initialblockdownload()) { + if(blockchainInfo.initialblockdownload() && networkInfo.networkactive()) { syncingLock.lock(); try { syncing = true; diff --git a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/NetworkInfo.java b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/NetworkInfo.java index 131a28e7..67e198a5 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/NetworkInfo.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/NetworkInfo.java @@ -3,6 +3,6 @@ package com.sparrowwallet.sparrow.net.cormorant.bitcoind; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) -public record NetworkInfo(int version, String subversion) { +public record NetworkInfo(int version, String subversion, boolean networkactive) { } diff --git a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/electrum/ElectrumServerService.java b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/electrum/ElectrumServerService.java index 3eaf3b7a..d9659dc1 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/cormorant/electrum/ElectrumServerService.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/cormorant/electrum/ElectrumServerService.java @@ -45,7 +45,7 @@ public class ElectrumServerService { @JsonRpcMethod("server.banner") public String getServerBanner() { - return Cormorant.SERVER_NAME + " " + SparrowWallet.APP_VERSION + "\n" + bitcoindClient.getNetworkInfo().subversion(); + return Cormorant.SERVER_NAME + " " + SparrowWallet.APP_VERSION + "\n" + bitcoindClient.getNetworkInfo().subversion() + (bitcoindClient.getNetworkInfo().networkactive() ? "" : " (disconnected)"); } @JsonRpcMethod("blockchain.estimatefee")