From 2c175742cffaa0fc8b90e2a1fe70cdc7b63b133a Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Thu, 23 May 2024 16:38:40 -0700 Subject: [PATCH] Use new names --- core/node/libp2p/rcmgr.go | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index ab6e7294018b..8b6d55a2cfc6 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -77,21 +77,16 @@ filled in with autocomputed defaults.`) ropts := []rcmgr.Option{ rcmgr.WithMetrics(createRcmgrMetrics()), rcmgr.WithTraceReporter(str), - rcmgr.WithLimitPeersPerCIDR( - []rcmgr.ConnLimitPerCIDR{ + rcmgr.WithLimitPerSubnet( + nil, + []rcmgr.ConnLimitPerSubnet{ { - ConnCount: 16, - BitMask: 32, + ConnCount: 16, + PrefixLength: 56, }, - }, - []rcmgr.ConnLimitPerCIDR{ { - ConnCount: 16, - BitMask: 56, - }, - { - ConnCount: 8 * 16, - BitMask: 48, + ConnCount: 8 * 16, + PrefixLength: 48, }, }), }