remove unnecessary length check
This commit is contained in:
parent
eccded1360
commit
32c3fb325d
@ -1032,14 +1032,12 @@ func (gs *GossipSubRouter) heartbeat() {
|
||||
return !inMesh && !doBackoff && !direct && gs.score.Score(p) > medianScore
|
||||
})
|
||||
|
||||
if len(plst) != 0 {
|
||||
for _, p := range plst {
|
||||
log.Debugf("HEARTBEAT: Opportunistically graft peer %s on topic %s", p, topic)
|
||||
graftPeer(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2nd arg are mesh peers excluded from gossip. We already push
|
||||
// messages to them, so its redundant to gossip IHAVEs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user