Libp2p connection limits (#2272)
* max peers gets set as connection limits * pass max connections
This commit is contained in:
parent
6528707e44
commit
1117993a24
|
@ -1526,7 +1526,13 @@ proc newBeaconSwitch*(conf: BeaconNodeConf, seckey: PrivateKey,
|
||||||
|
|
||||||
let identify = newIdentify(peerInfo)
|
let identify = newIdentify(peerInfo)
|
||||||
|
|
||||||
newSwitch(peerInfo, transports, identify, muxers, secureManagers)
|
newSwitch(
|
||||||
|
peerInfo,
|
||||||
|
transports,
|
||||||
|
identify,
|
||||||
|
muxers,
|
||||||
|
secureManagers,
|
||||||
|
maxConnections = conf.maxPeers)
|
||||||
|
|
||||||
proc createEth2Node*(rng: ref BrHmacDrbgContext,
|
proc createEth2Node*(rng: ref BrHmacDrbgContext,
|
||||||
conf: BeaconNodeConf,
|
conf: BeaconNodeConf,
|
||||||
|
|
|
@ -373,7 +373,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
||||||
--log-level="${LOG_LEVEL}" \
|
--log-level="${LOG_LEVEL}" \
|
||||||
--tcp-port=$(( BASE_PORT + NUM_NODE )) \
|
--tcp-port=$(( BASE_PORT + NUM_NODE )) \
|
||||||
--udp-port=$(( BASE_PORT + NUM_NODE )) \
|
--udp-port=$(( BASE_PORT + NUM_NODE )) \
|
||||||
--max-peers=$(( NUM_NODES - 1 )) \
|
--max-peers=$(( NUM_NODES * 2 - 1 )) \
|
||||||
--data-dir="${NODE_DATA_DIR}" \
|
--data-dir="${NODE_DATA_DIR}" \
|
||||||
${BOOTSTRAP_ARG} \
|
${BOOTSTRAP_ARG} \
|
||||||
${STATE_SNAPSHOT_ARG} \
|
${STATE_SNAPSHOT_ARG} \
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0959877b29be802b857cb10ab194f5cf29e3649f
|
Subproject commit 1d77d37f17a8d4b9bbafb83eae69790dad48b4c5
|
Loading…
Reference in New Issue