From d23a1889cd423e7e5a82e86b95c8bb092b2182b8 Mon Sep 17 00:00:00 2001 From: Lucas Molas Date: Mon, 7 Mar 2022 20:55:38 -0300 Subject: [PATCH] log absent limit file --- core/node/libp2p/rcmgr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index fc9e3a62d95..523731d6b1a 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -4,12 +4,12 @@ import ( "context" "errors" "fmt" - "os" "github.com/ipfs/go-ipfs/repo" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p-core/network" rcmgr "github.com/libp2p/go-libp2p-resource-manager" "go.uber.org/fx" + "os" ) const NetLimitDefaultFilename = "limit.json" @@ -21,6 +21,7 @@ func ResourceManager() func(fx.Lifecycle, repo.Repo) (network.ResourceManager, L limitFile, err := os.Open(NetLimitDefaultFilename) if errors.Is(err, os.ErrNotExist) { + log.Debug("limit file %s not found, creating a default resource manager", NetLimitDefaultFilename) limiter = rcmgr.NewDefaultLimiter() } else { if err != nil {