keep D peer when pruning for oversubscription

This commit is contained in:
vyzo 2020-03-03 12:11:37 +02:00
parent 712bab2c64
commit dc6af4bbe6

View File

@ -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 // We keep the first D_score peers by score and the remaining up to D_lo randomly
shufflePeers(plst[GossipSubDscore:]) 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) log.Debugf("HEARTBEAT: Remove mesh link to %s in %s", p, topic)
prunePeer(p) prunePeer(p)
} }