Fix tests of #638
This commit is contained in:
parent
fd59cbc7a9
commit
f98bf612bd
|
@ -574,7 +574,8 @@ suite "GossipSub":
|
|||
let
|
||||
nodes = generateNodes(
|
||||
2,
|
||||
gossip = true)
|
||||
gossip = true,
|
||||
unsubscribeBackoff = 10.minutes)
|
||||
|
||||
# start switches
|
||||
nodesFut = await allFinished(
|
||||
|
|
|
@ -40,6 +40,7 @@ proc generateNodes*(
|
|||
verifySignature: bool = libp2p_pubsub_verify,
|
||||
anonymize: bool = libp2p_pubsub_anonymize,
|
||||
sign: bool = libp2p_pubsub_sign,
|
||||
unsubscribeBackoff = 1.seconds,
|
||||
maxMessageSize: int = 1024 * 1024): seq[PubSub] =
|
||||
|
||||
for i in 0..<num:
|
||||
|
@ -53,7 +54,7 @@ proc generateNodes*(
|
|||
msgIdProvider = msgIdProvider,
|
||||
anonymize = anonymize,
|
||||
maxMessageSize = maxMessageSize,
|
||||
parameters = (var p = GossipSubParams.init(); p.floodPublish = false; p.historyLength = 20; p.historyGossip = 20; p.unsubscribeBackoff = 1.seconds; p))
|
||||
parameters = (var p = GossipSubParams.init(); p.floodPublish = false; p.historyLength = 20; p.historyGossip = 20; p.unsubscribeBackoff = unsubscribeBackoff; p))
|
||||
# set some testing params, to enable scores
|
||||
g.topicParams.mgetOrPut("foobar", TopicParams.init()).topicWeight = 1.0
|
||||
g.topicParams.mgetOrPut("foo", TopicParams.init()).topicWeight = 1.0
|
||||
|
|
Loading…
Reference in New Issue