Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Jan 14, 2025
1 parent 296584f commit e32788b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/pubsub/testgossipsub.nim
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,12 @@ suite "GossipSub":
func dumbMsgIdProvider(m: Message): Result[MessageId, ValidationResult] =
ok(newSeq[byte](10))
let
nodes = generateNodes(2, gossip = true, msgIdProvider = dumbMsgIdProvider)
nodes = generateNodes(
2,
gossip = true,
msgIdProvider = dumbMsgIdProvider,
sendIDontWantOnPublish = true,
)

nodesFut = await allFinished(nodes[0].switch.start(), nodes[1].switch.start())

Expand Down
2 changes: 2 additions & 0 deletions tests/pubsub/utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ proc generateNodes*(
overheadRateLimit: Opt[tuple[bytes: int, interval: Duration]] =
Opt.none(tuple[bytes: int, interval: Duration]),
gossipSubVersion: string = "",
sendIDontWantOnPublish: bool = false,
): seq[PubSub] =
for i in 0 ..< num:
let switch = newStandardSwitch(
Expand All @@ -97,6 +98,7 @@ proc generateNodes*(
p.unsubscribeBackoff = unsubscribeBackoff
p.enablePX = enablePX
p.overheadRateLimit = overheadRateLimit
p.sendIDontWantOnPublish = sendIDontWantOnPublish
p
),
)
Expand Down

0 comments on commit e32788b

Please sign in to comment.