mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-26 02:11:10 +00:00
cormorant: skip waiting for ibd to complete when networkactive is false
This commit is contained in:
parent
d07a5f0a01
commit
bd0aca66b5
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue