File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
12
12
"github.com/libp2p/go-libp2p/core/peer"
13
13
"github.com/libp2p/go-libp2p/p2p/discovery/routing"
14
14
"github.com/libp2p/go-libp2p/p2p/discovery/util"
15
+ rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
15
16
rhost "github.com/libp2p/go-libp2p/p2p/host/routed"
16
17
"github.com/libp2p/go-libp2p/p2p/net/connmgr"
17
18
"github.com/multiformats/go-multiaddr"
@@ -268,6 +269,14 @@ func createHost(
268
269
libp2p .EnableRelayService (),
269
270
)
270
271
}
272
+ if config .IsBootstrapNode || config .IsAccessNode {
273
+ // No resource limits on boot and access nodes for now
274
+ mgr , err := rcmgr .NewResourceManager (rcmgr .NewFixedLimiter (rcmgr .InfiniteLimits ))
275
+ if err != nil {
276
+ return nil , nil , err
277
+ }
278
+ options = append (options , libp2p .ResourceManager (mgr ))
279
+ }
271
280
}
272
281
273
282
p2pHost , err := libp2p .New (options ... )
You can’t perform that action at this time.
0 commit comments