Browse Source

Always log "Synchronizing with peer..." as it may help give more clarity to those with sync issues.

qdn
CalDescent 3 years ago
parent
commit
396dc5c9b0
  1. 11
      src/main/java/org/qortal/controller/Synchronizer.java

11
src/main/java/org/qortal/controller/Synchronizer.java

@ -589,16 +589,7 @@ public class Synchronizer {
String syncString = String.format("Synchronizing with peer %s at height %d, sig %.8s, ts %d; our height %d, sig %.8s, ts %d", peer,
peerHeight, Base58.encode(peersLastBlockSignature), peer.getChainTipData().getLastBlockTimestamp(),
ourInitialHeight, Base58.encode(ourLastBlockSignature), ourLatestBlockData.getTimestamp());
// If our latest block is very old, we should log that we're attempting to sync with a peer
// Otherwise, it can appear as though nothing is happening for a while after launch
final Long minLatestBlockTimestamp = Controller.getMinimumLatestBlockTimestamp();
if (minLatestBlockTimestamp != null && ourLatestBlockData.getTimestamp() < minLatestBlockTimestamp) {
LOGGER.info(syncString);
}
else {
LOGGER.debug(syncString);
}
LOGGER.info(syncString);
// Reset last re-org size as we are starting a new sync round
this.lastReorgSize = 0;

Loading…
Cancel
Save