mirror of https://github.com/status-im/nim-eth.git
Do not start the peer pool loop when discovery is disabled
This commit is contained in:
parent
b1be962694
commit
680e52ec24
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue