diff --git a/cmd/fulahub/main.go b/cmd/fulahub/main.go index d07a339..742722c 100644 --- a/cmd/fulahub/main.go +++ b/cmd/fulahub/main.go @@ -14,6 +14,7 @@ import ( "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/network" ) var logger = log.Logger("fula/hub/main") @@ -33,6 +34,8 @@ func main() { "", "comma separated IPNI provider addresses") dsPath := flag.String("dsPath", "", "Datastore path") + disableResourceManager := flag.Bool("disableResourceManager", + true, "Whether to disable the libp2p resource manager") flag.Parse() @@ -51,6 +54,9 @@ func main() { if *listenAddrs != "" { lopts = append(lopts, libp2p.ListenAddrStrings(strings.Split(*listenAddrs, ",")...)) } + if *disableResourceManager { + lopts = append(lopts, libp2p.ResourceManager(&network.NullResourceManager{})) + } host, err := libp2p.New(lopts...) if err != nil { diff --git a/go.mod b/go.mod index 5262dcc..8923b55 100644 --- a/go.mod +++ b/go.mod @@ -11,11 +11,9 @@ require ( github.com/ipni/go-libipni v0.5.7 github.com/libp2p/go-libp2p v0.32.1 github.com/libp2p/go-libp2p-gostream v0.6.0 - github.com/libp2p/go-libp2p-http v0.5.0 github.com/multiformats/go-multiaddr v0.12.0 github.com/multiformats/go-multihash v0.2.3 github.com/multiformats/go-varint v0.0.7 - github.com/stretchr/testify v1.8.4 ) require ( @@ -24,7 +22,6 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -83,7 +80,6 @@ require ( github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_golang v1.17.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect @@ -112,6 +108,5 @@ require ( golang.org/x/tools v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect ) diff --git a/go.sum b/go.sum index 8fbb489..1985a3a 100644 --- a/go.sum +++ b/go.sum @@ -204,8 +204,6 @@ github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLE github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-gostream v0.6.0 h1:QfAiWeQRce6pqnYfmIVWJFXNdDyfiR/qkCnjyaZUPYU= github.com/libp2p/go-libp2p-gostream v0.6.0/go.mod h1:Nywu0gYZwfj7Jc91PQvbGU8dIpqbQQkjWgDuOrFaRdA= -github.com/libp2p/go-libp2p-http v0.5.0 h1:+x0AbLaUuLBArHubbbNRTsgWz0RjNTy6DJLOxQ3/QBc= -github.com/libp2p/go-libp2p-http v0.5.0/go.mod h1:glh87nZ35XCQyFsdzZps6+F4HYI6DctVFY5u1fehwSg= github.com/libp2p/go-libp2p-pubsub v0.10.0 h1:wS0S5FlISavMaAbxyQn3dxMOe2eegMfswM471RuHJwA= github.com/libp2p/go-libp2p-pubsub v0.10.0/go.mod h1:1OxbaT/pFRO5h+Dpze8hdHQ63R0ke55XTs6b6NwLLkw= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=