From 680e52ec24e9dd166cb591241f35b3099770a531 Mon Sep 17 00:00:00 2001 From: kdeme Date: Thu, 7 Nov 2019 14:14:15 +0100 Subject: [PATCH] Do not start the peer pool loop when discovery is disabled --- eth/p2p.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eth/p2p.nim b/eth/p2p.nim index df0755e..9bdf775 100644 --- a/eth/p2p.nim +++ b/eth/p2p.nim @@ -104,11 +104,10 @@ proc connectToNetwork*(node: EthereumNode, if enableDiscovery: node.discovery.open() await node.discovery.bootstrap() + node.peerPool.start() else: info "Discovery disabled" - node.peerPool.start() - while node.peerPool.connectedNodes.len == 0: trace "Waiting for more peers", peers = node.peerPool.connectedNodes.len await sleepAsync(500.milliseconds)