eth/dropper: changing error code to DiscUselessPeer

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-04-11 14:00:57 +02:00
parent ff66b1c42e
commit 2a9372ea5f
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -129,7 +129,7 @@ func (cm *dropper) dropRandomPeer() bool {
p := droppable[mrand.Intn(len(droppable))]
log.Debug("Dropping random peer", "inbound", p.Inbound(),
"id", p.ID(), "duration", common.PrettyDuration(p.Lifetime()), "peercountbefore", len(peers))
p.Disconnect(p2p.DiscTooManyPeers)
p.Disconnect(p2p.DiscUselessPeer)
if p.Inbound() {
droppedInbound.Mark(1)
} else {