From d60822e8a0dcf3bc25d22fcfc0432f761afb2588 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Mon, 16 Sep 2024 17:32:50 +0200 Subject: [PATCH] Remove unused utils. --- tests/pubsub/utils.nim | 15 --------------- 1 file changed, 15 deletions(-) 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!")