Make sure to give up if we are requesting block summaries when the core needs to shut down.

This commit is contained in:
CalDescent 2021-04-17 12:57:28 +01:00
parent 2efc9218df
commit 08dacab05c

View File

@ -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();