Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Aug 16, 2023
1 parent b920488 commit 19c199d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions p2p/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/libp2p/go-libp2p/core/transport"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
rcmgrObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs"
"github.com/libp2p/go-libp2p/p2p/muxer/yamux"
"github.com/libp2p/go-libp2p/p2p/net/connmgr"
tptu "github.com/libp2p/go-libp2p/p2p/net/upgrader"
Expand Down Expand Up @@ -231,8 +230,8 @@ func New(_ context.Context, logger log.Log, cfg Config, prologue []byte, opts ..

func setupResourcesManager(hostcfg Config) func(cfg *libp2p.Config) error {
return func(cfg *libp2p.Config) error {
rcmgrObs.MustRegisterWith(prometheus.DefaultRegisterer)
str, err := rcmgrObs.NewStatsTraceReporter()
rcmgr.MustRegisterWith(prometheus.DefaultRegisterer)
str, err := rcmgr.NewStatsTraceReporter()
if err != nil {
return err
}
Expand Down

0 comments on commit 19c199d

Please sign in to comment.