forked from Qortal/qortal
Improved synchronization logging
This commit is contained in:
parent
c05fe58676
commit
1f81784bd6
@ -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,9 +275,9 @@ public class Controller extends Thread {
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
LOGGER.debug(String.format("Synchronized with peer %s", peer));
|
||||
}
|
||||
|
||||
// Broadcast our new height (if changed)
|
||||
int updatedHeight = getChainHeight();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user