eth: change block propagation and announcement logs to debug

This commit is contained in:
Manav Darji 2024-06-10 12:32:17 +05:30
parent 6bc8334852
commit 2aa76a9926
No known key found for this signature in database
GPG key ID: 65B79E6951B5BFF6

View file

@ -623,15 +623,13 @@ func (h *handler) BroadcastBlock(block *types.Block, propagate bool) {
peer.AsyncSendNewBlock(block, td)
}
log.Trace("Propagated block", "hash", hash, "recipients", len(transfer), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
// Send the block to the trusted and static peers
for _, peer := range staticAndTrustedPeers {
log.Trace("Propagating block to static and trusted peer", "hash", hash, "peerID", peer.ID())
peer.AsyncSendNewBlock(block, td)
}
log.Trace("Propagated same block to additional static and trusted peers", "hash", hash, "recipients", len(staticAndTrustedPeers), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
log.Debug("Propagated block", "hash", hash, "recipients", len(transfer), "static and trusted recipients", len(staticAndTrustedPeers), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
return
}
@ -641,7 +639,7 @@ func (h *handler) BroadcastBlock(block *types.Block, propagate bool) {
peer.AsyncSendNewBlockHash(block)
}
log.Trace("Announced block", "hash", hash, "recipients", len(peers), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
log.Debug("Announced block", "hash", hash, "recipients", len(peers), "duration", common.PrettyDuration(time.Since(block.ReceivedAt)))
}
}