diff --git a/tests/test_peer_pool.nim b/tests/test_peer_pool.nim index 3cbe93f01..f2148381a 100644 --- a/tests/test_peer_pool.nim +++ b/tests/test_peer_pool.nim @@ -28,6 +28,9 @@ func getFuture(peer: PeerTest): Future[void] = func `<`(a, b: PeerTest): bool = `<`(a.weight, b.weight) +proc isAlive*(peer: PeerTest): bool = + not(peer.future.finished()) + proc init*(t: typedesc[PeerTest], id: string = "", weight: int = 0): PeerTest = PeerTest(id: id, weight: weight, future: newFuture[void]())