mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
disable discovery if maxPeers set to zero
This commit is contained in:
parent
a90bf1c99a
commit
1008e87ec2
@ -132,8 +132,9 @@ proc setupP2P(nimbus: NimbusNode, conf: NimbusConf,
|
|||||||
asyncCheck nimbus.ethNode.peerPool.connectToNode(newNode(enode))
|
asyncCheck nimbus.ethNode.peerPool.connectToNode(newNode(enode))
|
||||||
|
|
||||||
# Start Eth node
|
# Start Eth node
|
||||||
waitFor nimbus.ethNode.connectToNetwork(
|
if conf.maxPeers > 0:
|
||||||
enableDiscovery = conf.discovery != DiscoveryType.None)
|
waitFor nimbus.ethNode.connectToNetwork(
|
||||||
|
enableDiscovery = conf.discovery != DiscoveryType.None)
|
||||||
|
|
||||||
proc localServices(nimbus: NimbusNode, conf: NimbusConf,
|
proc localServices(nimbus: NimbusNode, conf: NimbusConf,
|
||||||
chainDB: BaseChainDB, protocols: set[ProtocolFlag]) =
|
chainDB: BaseChainDB, protocols: set[ProtocolFlag]) =
|
||||||
@ -252,7 +253,7 @@ proc localServices(nimbus: NimbusNode, conf: NimbusConf,
|
|||||||
else:
|
else:
|
||||||
if conf.engineApiEnabled or conf.engineApiWsEnabled:
|
if conf.engineApiEnabled or conf.engineApiWsEnabled:
|
||||||
warn "Cannot enable engine API without sealing engine",
|
warn "Cannot enable engine API without sealing engine",
|
||||||
hint = "use --engine-signer to enable sealing engine"
|
hint = "use --engine-signer to enable sealing engine"
|
||||||
|
|
||||||
# metrics server
|
# metrics server
|
||||||
if conf.metricsEnabled:
|
if conf.metricsEnabled:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user