Remove unused utils.
This commit is contained in:
parent
b40eaa859e
commit
d60822e8a0
|
@ -207,18 +207,3 @@ proc waitSubGraph*(nodes: seq[PubSub], key: string) {.async.} =
|
||||||
|
|
||||||
await sleepAsync(5.milliseconds)
|
await sleepAsync(5.milliseconds)
|
||||||
doAssert Moment.now() < timeout, "waitSubGraph timeout!"
|
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!")
|
|
||||||
|
|
Loading…
Reference in New Issue