Skip to content

Commit

Permalink
eth: change block propagation and announcement logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Jun 10, 2024
1 parent 6bc8334 commit 2aa76a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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)))
}
}

Expand Down

0 comments on commit 2aa76a9

Please sign in to comment.