diff --git a/packages/beacon-node/src/network/nodejs/bundle.ts b/packages/beacon-node/src/network/nodejs/bundle.ts index f226c99f784..3b7abdd97dd 100644 --- a/packages/beacon-node/src/network/nodejs/bundle.ts +++ b/packages/beacon-node/src/network/nodejs/bundle.ts @@ -66,8 +66,11 @@ export async function createNodejsLibp2p(options: ILibp2pOptions): Promise maxConnections calls _maybeDisconnectOne() which will sort peers disconnect + // the one with the least `_peerValues`. That's a custom peer generalized score that's not used, so it always + // has the same value in current Lodestar usage. + maxConnections: options.maxConnections, // DOCS: the minimum number of connections below which libp2p not activate preemptive disconnections. // If ConnectionManager.size < minConnections, it won't prune peers in _maybeDisconnectOne(). If autoDial is // off it doesn't have any effect in behaviour.