Browse Source

Slightly better logging for synchronizer

split-DB
catbref 5 years ago
parent
commit
1046f72e7b
  1. 7
      src/main/java/org/qora/controller/Synchronizer.java

7
src/main/java/org/qora/controller/Synchronizer.java

@ -104,9 +104,12 @@ public class Synchronizer {
LOGGER.debug(String.format("Common block with peer %s is at height %d", peer, commonBlockHeight)); LOGGER.debug(String.format("Common block with peer %s is at height %d", peer, commonBlockHeight));
signatures.remove(0); signatures.remove(0);
// If common block is peer's latest block then we simply have a longer chain to peer, so exit now // If common block is peer's latest block then we simply have the same, or longer, chain to peer, so exit now
if (commonBlockHeight == peerHeight) { if (commonBlockHeight == peerHeight) {
LOGGER.info(String.format("We have the same blockchain as peer %s, but longer", peer)); if (peerHeight == ourHeight)
LOGGER.info(String.format("We have the same blockchain as peer %s", peer));
else
LOGGER.info(String.format("We have the same blockchain as peer %s, but longer", peer));
return SynchronizationResult.OK; return SynchronizationResult.OK;
} }

Loading…
Cancel
Save