Skip to content

Commit 3b61c68

Browse files
fix: reset sync state when closing in AbstractQuorumState
Signed-off-by: HashEngineering <hashengineeringsolutions@gmail.com>
1 parent 3497397 commit 3b61c68

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

core/src/main/java/org/bitcoinj/evolution/AbstractQuorumState.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,4 +856,10 @@ Sha256Hash getHashModifier(LLMQParameters llmqParams, StoredBlock quorumBaseBloc
856856
}
857857
return LLMQUtils.buildLLMQBlockHash(llmqParams.getType(), quorumBaseBlock.getHeader().getHash());
858858
}
859+
860+
public void close() {
861+
// reset the state of any sync operation
862+
initChainTipSyncComplete = false;
863+
waitingForMNListDiff = false;
864+
}
859865
}

core/src/main/java/org/bitcoinj/evolution/SimplifiedMasternodeListManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ public void close() {
411411
quorumState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
412412
quorumRotationState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
413413
// reset state of chain sync
414-
quorumState.initChainTipSyncComplete = false;
415-
quorumRotationState.initChainTipSyncComplete = false;
414+
quorumState.close();
415+
quorumRotationState.close();
416416

417417
try {
418418
threadPool.shutdown();

0 commit comments

Comments
 (0)