mirror of
https://github.com/Qortal/qortal.git
synced 2025-05-02 15:57:52 +00:00
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);
|
Peer peer = peers.get(index);
|
||||||
|
|
||||||
if (!Synchronizer.getInstance().synchronize(peer)) {
|
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
|
// Failure so don't use this peer again for a while
|
||||||
try (final Repository repository = RepositoryManager.getRepository()) {
|
try (final Repository repository = RepositoryManager.getRepository()) {
|
||||||
@ -275,9 +275,9 @@ public class Controller extends Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return;
|
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)
|
// Broadcast our new height (if changed)
|
||||||
int updatedHeight = getChainHeight();
|
int updatedHeight = getChainHeight();
|
||||||
|
@ -85,7 +85,7 @@ public class Synchronizer {
|
|||||||
// First signature is common block
|
// First signature is common block
|
||||||
BlockData commonBlockData = this.repository.getBlockRepository().fromSignature(signatures.get(0));
|
BlockData commonBlockData = this.repository.getBlockRepository().fromSignature(signatures.get(0));
|
||||||
final int commonBlockHeight = commonBlockData.getHeight();
|
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);
|
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 a longer chain to peer, so exit now
|
||||||
|
Loading…
x
Reference in New Issue
Block a user