pass max peers to builder

This commit is contained in:
Dmitriy Ryajov 2021-04-13 14:08:33 -06:00 committed by zah
parent 4ed2e34a9e
commit 3e3137ec14
1 changed files with 3 additions and 2 deletions

View File

@ -1538,10 +1538,11 @@ proc newBeaconSwitch*(config: BeaconNodeConf, seckey: PrivateKey,
.withPrivateKey(seckey) .withPrivateKey(seckey)
.withAddress(address) .withAddress(address)
.withRng(rng) .withRng(rng)
.withMplex(5.minutes, 5.minutes)
.withTcpTransport({ServerFlags.ReuseAddr})
.withNoise() .withNoise()
.withMplex(5.minutes, 5.minutes)
.withMaxConnections(config.maxPeers)
.withAgentVersion(config.agentString) .withAgentVersion(config.agentString)
.withTcpTransport({ServerFlags.ReuseAddr})
.build() .build()
except CatchableError as exc: raise exc except CatchableError as exc: raise exc
except Exception as exc: # TODO fix libp2p except Exception as exc: # TODO fix libp2p