update comment.

Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
This commit is contained in:
vyzo 2022-05-31 12:32:56 +03:00 committed by GitHub
parent a1e6410178
commit bc180c8d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo)
return func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error) {
isFullNode := repo.RepoType().Type() == "FullNode"
envvar := os.Getenv("LOTUS_RCMGR")
if (isFullNode && envvar == "0") || // enable by default for full nodes
if (isFullNode && envvar == "0") || // only set NullResourceManager if envvar is explicitly "0"
(!isFullNode && envvar != "1") { // otherwise, opt-in with envvar
log.Info("libp2p resource manager is disabled")
return network.NullResourceManager, nil