mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-23 18:18:11 +00:00
fix test utils generateNodes
This commit is contained in:
parent
b61f1da9a8
commit
f74e693ea8
@ -9,8 +9,9 @@ randomize()
|
||||
proc generateNodes*(num: Natural, gossip: bool = false): seq[Switch] =
|
||||
for i in 0..<num:
|
||||
var switch = newStandardSwitch(gossip = gossip)
|
||||
var gossip = GossipSub(switch.pubSub.get())
|
||||
gossip.parameters.floodPublish = false
|
||||
if gossip:
|
||||
var gossipSub = GossipSub(switch.pubSub.get())
|
||||
gossipSub.parameters.floodPublish = false
|
||||
result.add(switch)
|
||||
|
||||
proc subscribeNodes*(nodes: seq[Switch]) {.async.} =
|
||||
|
Loading…
x
Reference in New Issue
Block a user