From fd59cbc7a9b75ed84adc82705808edb12cb31912 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Mon, 21 Feb 2022 17:00:18 +0100 Subject: [PATCH] Fix shuffle of #638 --- libp2p/protocols/pubsub/gossipsub.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index 010be4f..8261ac5 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -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)