From dc6af4bbe663962ddfe686713977100a73283601 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 3 Mar 2020 12:11:37 +0200 Subject: [PATCH] keep D peer when pruning for oversubscription --- gossipsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipsub.go b/gossipsub.go index 4ebe85d..d398c8d 100644 --- a/gossipsub.go +++ b/gossipsub.go @@ -715,7 +715,7 @@ func (gs *GossipSubRouter) heartbeat() { // We keep the first D_score peers by score and the remaining up to D_lo randomly shufflePeers(plst[GossipSubDscore:]) - for _, p := range plst[GossipSubDlo:] { + for _, p := range plst[GossipSubD:] { log.Debugf("HEARTBEAT: Remove mesh link to %s in %s", p, topic) prunePeer(p) }