From a6237bd1c1899f045792a47c97a0d6b2b365bb45 Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 9 Apr 2024 23:45:09 +0200 Subject: [PATCH] clear non priority queue when score is negative --- libp2p/protocols/pubsub/gossipsub/behavior.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/libp2p/protocols/pubsub/gossipsub/behavior.nim b/libp2p/protocols/pubsub/gossipsub/behavior.nim index 302695abf..d7c793204 100644 --- a/libp2p/protocols/pubsub/gossipsub/behavior.nim +++ b/libp2p/protocols/pubsub/gossipsub/behavior.nim @@ -663,6 +663,7 @@ proc onHeartbeat(g: GossipSub) {.raises: [].} = g.pruned(peer, t) g.mesh.removePeer(t, peer) prunes &= peer + peer.clearNonPriorityQueue() if prunes.len > 0: let prune = RPCMsg(control: some(ControlMessage( prune: @[ControlPrune(