Skip to content

Commit

Permalink
fix: reset initial chain tip sync status when mnlist manager is closed
Browse files Browse the repository at this point in the history
Signed-off-by: HashEngineering <hashengineeringsolutions@gmail.com>
  • Loading branch information
HashEngineering committed Nov 17, 2023
1 parent 97f7258 commit 6334da3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,12 @@ public void setBlockChain(DualBlockChain blockChain, @Nullable PeerGroup peerGro
@Override
public void close() {
if (shouldProcessMNListDiff()) {
// TODO: refactor the next several lines into AbstractQuorumState.close(...)
quorumState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
quorumRotationState.removeEventListeners(blockChain.getBlockChain(), peerGroup);
// reset state of chain sync
quorumState.initChainTipSyncComplete = false;
quorumRotationState.initChainTipSyncComplete = false;

try {
threadPool.shutdown();
Expand Down

0 comments on commit 6334da3

Please sign in to comment.