diff --git a/tests/pubsub/testgossipsub.nim b/tests/pubsub/testgossipsub.nim index 27a88ed321..52d5e66f22 100644 --- a/tests/pubsub/testgossipsub.nim +++ b/tests/pubsub/testgossipsub.nim @@ -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()) @@ -948,10 +953,10 @@ suite "GossipSub": nodes[1].switch.peerInfo.peerId, nodes[1].switch.peerInfo.addrs ) - proc handlerA(topic: string, data: seq[byte]) {.async.} = + proc handlerA(topic: string, data: seq[byte]) {.async: (raises: []).} = discard - proc handlerB(topic: string, data: seq[byte]) {.async.} = + proc handlerB(topic: string, data: seq[byte]) {.async: (raises: []).} = discard nodes[0].subscribe("foobar", handlerA) diff --git a/tests/pubsub/utils.nim b/tests/pubsub/utils.nim index ecd0e7b9a6..be58ac064d 100644 --- a/tests/pubsub/utils.nim +++ b/tests/pubsub/utils.nim @@ -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( @@ -97,6 +98,7 @@ proc generateNodes*( p.unsubscribeBackoff = unsubscribeBackoff p.enablePX = enablePX p.overheadRateLimit = overheadRateLimit + p.sendIDontWantOnPublish = sendIDontWantOnPublish p ), )