From 08dacab05c6af9f2ecdd743d48dbc93953c46eda Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sat, 17 Apr 2021 12:57:28 +0100 Subject: [PATCH] Make sure to give up if we are requesting block summaries when the core needs to shut down. --- src/main/java/org/qortal/controller/Synchronizer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/qortal/controller/Synchronizer.java b/src/main/java/org/qortal/controller/Synchronizer.java index 54d05a06..94a3a644 100644 --- a/src/main/java/org/qortal/controller/Synchronizer.java +++ b/src/main/java/org/qortal/controller/Synchronizer.java @@ -277,6 +277,10 @@ public class Synchronizer { // Fetch block summaries from each peer for (Peer peer : peersSharingCommonBlock) { + // If we're shutting down, just return the latest peer list + if (Controller.isStopping()) + return peers; + // Count the number of blocks this peer has beyond our common block final int peerHeight = peer.getChainTipData().getLastHeight(); final int peerAdditionalBlocksAfterCommonBlock = peerHeight - commonBlockSummary.getHeight();