mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-27 02:41: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();
|
tip = blockHeader.getBlockHeader();
|
||||||
timer.schedule(new PollTask(), 5000, 5000);
|
timer.schedule(new PollTask(), 5000, 5000);
|
||||||
|
|
||||||
if(blockchainInfo.initialblockdownload()) {
|
if(blockchainInfo.initialblockdownload() && networkInfo.networkactive()) {
|
||||||
syncingLock.lock();
|
syncingLock.lock();
|
||||||
try {
|
try {
|
||||||
syncing = true;
|
syncing = true;
|
||||||
|
|
|
@ -3,6 +3,6 @@ package com.sparrowwallet.sparrow.net.cormorant.bitcoind;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@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")
|
@JsonRpcMethod("server.banner")
|
||||||
public String getServerBanner() {
|
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")
|
@JsonRpcMethod("blockchain.estimatefee")
|
||||||
|
|
Loading…
Reference in a new issue