mirror of https://github.com/vacp2p/nim-libp2p.git
Fix shuffle of #638
This commit is contained in:
parent
bc318084f4
commit
fd59cbc7a9
|
@ -492,7 +492,7 @@ method publish*(g: GossipSub,
|
|||
g.replenishFanout(topic)
|
||||
fanoutPeers = g.fanout.getOrDefault(topic).toSeq()
|
||||
|
||||
fanoutPeers.shuffle()
|
||||
g.rng.shuffle(fanoutPeers)
|
||||
if fanoutPeers.len + peers.len > g.parameters.d:
|
||||
fanoutPeers.setLen(g.parameters.d - peers.len)
|
||||
|
||||
|
|
Loading…
Reference in New Issue