mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-04 09:06:20 +00:00
make sure to waitsub in sparse test
This commit is contained in:
parent
03801fcc52
commit
ab8d7cc968
@ -552,7 +552,7 @@ method publish*(g: GossipSub,
|
||||
let msg = newMessage(g.peerInfo, data, topic, g.sign)
|
||||
debug "created new message", msg
|
||||
|
||||
debug "publishing on topic", name = topic
|
||||
debug "publishing on topic", name = topic, peers = peers
|
||||
if msg.msgId notin g.mcache:
|
||||
g.mcache.put(msg)
|
||||
|
||||
|
@ -379,7 +379,7 @@ suite "GossipSub":
|
||||
nodes.add newStandardSwitch(triggerSelf = true, gossip = true, secureManagers = [SecureProtocol.Secio])
|
||||
awaitters.add((await nodes[i].start()))
|
||||
|
||||
await subscribeSparseNodes(nodes, 4)
|
||||
await subscribeSparseNodes(nodes, 4)
|
||||
|
||||
var seen: Table[string, int]
|
||||
var subs: seq[Future[void]]
|
||||
@ -398,6 +398,7 @@ suite "GossipSub":
|
||||
seenFut.complete()
|
||||
|
||||
subs &= dialer.subscribe("foobar", handler)
|
||||
subs &= waitSub(nodes[0], dialer, "foobar")
|
||||
|
||||
await allFuturesThrowing(subs)
|
||||
await wait(nodes[0].publish("foobar",
|
||||
|
Loading…
x
Reference in New Issue
Block a user