diff --git a/tests/pubsub/utils.nim b/tests/pubsub/utils.nim index faa77cd5c..491b70c02 100644 --- a/tests/pubsub/utils.nim +++ b/tests/pubsub/utils.nim @@ -207,18 +207,3 @@ proc waitSubGraph*(nodes: seq[PubSub], key: string) {.async.} = await sleepAsync(5.milliseconds) doAssert Moment.now() < timeout, "waitSubGraph timeout!" - -proc waitForMesh*( - sender: auto, receiver: auto, key: string, timeoutDuration = 5.seconds -) {.async.} = - if sender == receiver: - return - - let - timeoutMoment = Moment.now() + timeoutDuration - gossipsubSender = GossipSub(sender) - receiverPeerId = receiver.peerInfo.peerId - - while not gossipsubSender.mesh.hasPeerId(key, receiverPeerId): - trace "waitForMesh sleeping..." - await activeWait(5.milliseconds, timeoutMoment, "waitForMesh timeout!")