mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-24 02:28:19 +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] =
|
proc generateNodes*(num: Natural, gossip: bool = false): seq[Switch] =
|
||||||
for i in 0..<num:
|
for i in 0..<num:
|
||||||
var switch = newStandardSwitch(gossip = gossip)
|
var switch = newStandardSwitch(gossip = gossip)
|
||||||
var gossip = GossipSub(switch.pubSub.get())
|
if gossip:
|
||||||
gossip.parameters.floodPublish = false
|
var gossipSub = GossipSub(switch.pubSub.get())
|
||||||
|
gossipSub.parameters.floodPublish = false
|
||||||
result.add(switch)
|
result.add(switch)
|
||||||
|
|
||||||
proc subscribeNodes*(nodes: seq[Switch]) {.async.} =
|
proc subscribeNodes*(nodes: seq[Switch]) {.async.} =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user