Skip to content

Commit

Permalink
Merge pull request #8965 from ipfs/schomatis/fix/disable-rcmg-checks
Browse files Browse the repository at this point in the history
fix(node/libp2p): disable rcmgr checkImplicitDefaults
  • Loading branch information
schomatis authored and guseggert committed Jun 8, 2022
1 parent 9f3e75d commit c0e77fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ default_environment: &default_environment
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1

executors:
golang:
Expand Down
6 changes: 5 additions & 1 deletion core/node/libp2p/rcmgr_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"math/bits"
"os"
"strings"

config "github.com/ipfs/go-ipfs/config"
Expand All @@ -19,7 +20,10 @@ import (
// such as values in Swarm.ConnMgr.HiWater config.
func adjustedDefaultLimits(cfg config.SwarmConfig) rcmgr.DefaultLimitConfig {
// Run checks to avoid introducing regressions
checkImplicitDefaults()
if os.Getenv("IPFS_CHECK_RCMGR_DEFAULTS") != "" {
// FIXME: Broken. Being tracked in https://github.com/ipfs/go-ipfs/issues/8949.
checkImplicitDefaults()
}

// Return to use unmodified static limits based on values from go-libp2p 0.18
// return defaultLimits
Expand Down

0 comments on commit c0e77fb

Please sign in to comment.