forked from Qortal/qortal
Revert "When syncing to a peer on a different fork, ensure that all blocks are obtained before applying them."
This reverts commit c919797553754f6d7277123323d981919c96c98f.
This commit is contained in:
parent
2d2bfc0a4c
commit
02ace06526
@ -764,7 +764,11 @@ public class Synchronizer {
|
|||||||
LOGGER.info(String.format("Peer %s failed to respond with more block signatures after height %d, sig %.8s", peer,
|
LOGGER.info(String.format("Peer %s failed to respond with more block signatures after height %d, sig %.8s", peer,
|
||||||
height, Base58.encode(latestPeerSignature)));
|
height, Base58.encode(latestPeerSignature)));
|
||||||
|
|
||||||
// We need to fully synchronize, so give up and move on to the next peer
|
// If we have already received blocks from this peer, go ahead and apply them
|
||||||
|
if (peerBlocks.size() > 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Otherwise, give up and move on to the next peer
|
||||||
return SynchronizationResult.NO_REPLY;
|
return SynchronizationResult.NO_REPLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -789,7 +793,11 @@ public class Synchronizer {
|
|||||||
|
|
||||||
if (retryCount >= MAXIMUM_RETRIES) {
|
if (retryCount >= MAXIMUM_RETRIES) {
|
||||||
|
|
||||||
// We need to fully synchronize, so give up and move on to the next peer
|
// If we have already received blocks from this peer, go ahead and apply them
|
||||||
|
if (peerBlocks.size() > 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Otherwise, give up and move on to the next peer
|
||||||
return SynchronizationResult.NO_REPLY;
|
return SynchronizationResult.NO_REPLY;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user