Logging: peer table refresh (#4391)

changed some log messages

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
pull/4430/head
Sally MacFarlane 2 years ago committed by GitHub
parent 42086bf4a8
commit 94c95538e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerDiscoveryController.java
  2. 5
      ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/RecursivePeerRefreshState.java

@ -436,10 +436,10 @@ public class PeerDiscoveryController {
private void refreshTableIfRequired() {
final long now = System.currentTimeMillis();
if (lastRefreshTime + tableRefreshIntervalMs <= now) {
LOG.debug("Peer table refresh triggered by timer expiry");
LOG.debug("Refreshing peer table after {} ms", tableRefreshIntervalMs);
refreshTable();
} else if (!peerRequirement.hasSufficientPeers()) {
LOG.debug("Peer table refresh triggered by insufficient peers");
LOG.debug("Refreshing peer table: seeking more peers. peer count < max");
refreshTable();
}
}

@ -191,7 +191,10 @@ public class RecursivePeerRefreshState {
if (metadataPeer == null) {
return;
}
LOG.debug("Received neighbours packet with {} neighbours", peers.size());
LOG.debug(
"Received neighbours packet with {} neighbours from {}",
peers.size(),
peer.getEnodeURLString());
for (final DiscoveryPeer receivedDiscoPeer : peers) {
if (satisfiesMapAdditionCriteria(receivedDiscoPeer)) {
final MetadataPeer receivedMetadataPeer =

Loading…
Cancel
Save