Remove unused utils.

This commit is contained in:
Alejandro Cabeza Romero 2024-09-16 17:32:50 +02:00
parent b40eaa859e
commit d60822e8a0
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD
1 changed files with 0 additions and 15 deletions

View File

@ -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!")