Improved synchronization logging

This commit is contained in:
catbref 2019-05-16 13:30:26 +01:00
parent c05fe58676
commit 1f81784bd6
2 changed files with 4 additions and 4 deletions

View File

@ -262,7 +262,7 @@ public class Controller extends Thread {
Peer peer = peers.get(index);
if (!Synchronizer.getInstance().synchronize(peer)) {
LOGGER.debug(String.format("Failed to synchronize with peer %s", peer));
LOGGER.info(String.format("Failed to synchronize with peer %s", peer));
// Failure so don't use this peer again for a while
try (final Repository repository = RepositoryManager.getRepository()) {
@ -275,10 +275,10 @@ public class Controller extends Thread {
}
return;
} else {
LOGGER.debug(String.format("Synchronized with peer %s", peer));
}
LOGGER.debug(String.format("Synchronized with peer %s", peer));
// Broadcast our new height (if changed)
int updatedHeight = getChainHeight();
if (updatedHeight != ourHeight)

View File

@ -85,7 +85,7 @@ public class Synchronizer {
// First signature is common block
BlockData commonBlockData = this.repository.getBlockRepository().fromSignature(signatures.get(0));
final int commonBlockHeight = commonBlockData.getHeight();
LOGGER.info(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);
// If common block is peer's latest block then we simply have a longer chain to peer, so exit now