Do not start the peer pool loop when discovery is disabled

This commit is contained in:
kdeme 2019-11-07 14:14:15 +01:00 committed by zah
parent b1be962694
commit 680e52ec24
1 changed files with 1 additions and 2 deletions

View File

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