From 3e3137ec141053772d810baebafc817615faf9fa Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 13 Apr 2021 14:08:33 -0600 Subject: [PATCH] pass max peers to builder --- beacon_chain/networking/eth2_network.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index c9997fd5f..986f5f669 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -1538,10 +1538,11 @@ proc newBeaconSwitch*(config: BeaconNodeConf, seckey: PrivateKey, .withPrivateKey(seckey) .withAddress(address) .withRng(rng) - .withMplex(5.minutes, 5.minutes) - .withTcpTransport({ServerFlags.ReuseAddr}) .withNoise() + .withMplex(5.minutes, 5.minutes) + .withMaxConnections(config.maxPeers) .withAgentVersion(config.agentString) + .withTcpTransport({ServerFlags.ReuseAddr}) .build() except CatchableError as exc: raise exc except Exception as exc: # TODO fix libp2p