Skip to content

Commit

Permalink
ipfs: no limits
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Mar 5, 2024
1 parent d486c48 commit 04726d2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions ipfs/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,11 @@ func NewNode(ctx context.Context, privateKey crypto.PrivKey, cfg config.IPFS, ds

scalingLimits := rcmgr.DefaultLimits
libp2p.SetDefaultServiceLimits(&scalingLimits)
scaledDefaultLimits := scalingLimits.AutoScale()
resourceCfg := rcmgr.PartialLimitConfig{
System: rcmgr.ResourceLimits{
StreamsOutbound: rcmgr.Unlimited,
},
}
limits := resourceCfg.Build(scaledDefaultLimits)
limiter := rcmgr.NewFixedLimiter(limits)

limiter := rcmgr.NewFixedLimiter(rcmgr.InfiniteLimits)
rm, err := rcmgr.NewResourceManager(limiter, rcmgr.WithMetricsDisabled())
if err != nil {
panic(err)
return nil, fmt.Errorf("failed to create resource manager: %w", err)
}

opts := []libp2p.Option{
Expand Down

0 comments on commit 04726d2

Please sign in to comment.