eth/dropper: fixing logs

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-04-11 11:39:13 +02:00
parent 7a76bdd75e
commit 4a69bf90ff
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -88,8 +88,6 @@ func newDropper(maxDialPeers, maxInboundPeers int) *dropper {
if peerDropIntervalMin > peerDropIntervalMax {
panic("peerDropIntervalMin duration must be less than or equal to peerDropIntervalMax duration")
}
log.Info("New Dropper", "maxDialPeers", cm.maxDialPeers, "threshold", peerDropThreshold,
"intervalMin", peerDropIntervalMin, "intervalMax", peerDropIntervalMax)
return cm
}
@ -132,7 +130,8 @@ func (cm *dropper) dropRandomPeer() bool {
droppable := slices.DeleteFunc(peers, selectDoNotDrop)
if len(droppable) > 0 {
p := droppable[mrand.Intn(len(droppable))]
log.Debug("Dropping random peer", "id", p.ID(), "duration", common.PrettyDuration(p.Lifetime()), "inbound", p.Inbound(), "peercountbefore", len(peers))
log.Debug("Dropping random peer", "inbound", p.Inbound(),
"id", p.ID(), "duration", common.PrettyDuration(p.Lifetime()), "peercountbefore", len(peers))
p.Disconnect(p2p.DiscTooManyPeers)
if p.Inbound() {
droppedInbound.Mark(1)