forked from Qortal/qortal
Make sure to give up if we are requesting block summaries when the core needs to shut down.
This commit is contained in:
parent
2efc9218df
commit
08dacab05c
@ -277,6 +277,10 @@ public class Synchronizer {
|
|||||||
// Fetch block summaries from each peer
|
// Fetch block summaries from each peer
|
||||||
for (Peer peer : peersSharingCommonBlock) {
|
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
|
// Count the number of blocks this peer has beyond our common block
|
||||||
final int peerHeight = peer.getChainTipData().getLastHeight();
|
final int peerHeight = peer.getChainTipData().getLastHeight();
|
||||||
final int peerAdditionalBlocksAfterCommonBlock = peerHeight - commonBlockSummary.getHeight();
|
final int peerAdditionalBlocksAfterCommonBlock = peerHeight - commonBlockSummary.getHeight();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user