Skip to content

Commit

Permalink
Remove unused utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCabeza committed Sep 16, 2024
1 parent b40eaa8 commit d60822e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/pubsub/utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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!")

0 comments on commit d60822e

Please sign in to comment.