diff --git a/conn.go b/conn.go index cbc0b2a..749d826 100644 --- a/conn.go +++ b/conn.go @@ -13,7 +13,7 @@ type transportConn struct { network.ConnMultiaddrs network.ConnSecurity transport transport.Transport - scope network.ConnectionScope + scope network.ConnectionManagementScope stat network.ConnStats } diff --git a/go.mod b/go.mod index 336327d..d0f43e5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/ipfs/go-log/v2 v2.3.0 github.com/jbenet/go-temp-err-catcher v0.1.0 - github.com/libp2p/go-libp2p-core v0.13.1-0.20211222091732-aeb9233f0e8b + github.com/libp2p/go-libp2p-core v0.13.1-0.20211230092045-caacd9659af8 github.com/libp2p/go-libp2p-mplex v0.4.1 github.com/libp2p/go-libp2p-pnet v0.2.0 github.com/multiformats/go-multiaddr v0.3.3 diff --git a/go.sum b/go.sum index 27c12a8..6ba053f 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.13.1-0.20211222091732-aeb9233f0e8b h1:9MisJJGOKshOjznYauNzIW7ih8/mez4NzT1XerqmFrI= -github.com/libp2p/go-libp2p-core v0.13.1-0.20211222091732-aeb9233f0e8b/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.13.1-0.20211230092045-caacd9659af8 h1:YMGNLo9extN6iwBCaLbkoEyw1qtCXbtPmSZLHbxaYuo= +github.com/libp2p/go-libp2p-core v0.13.1-0.20211230092045-caacd9659af8/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= github.com/libp2p/go-libp2p-mplex v0.4.1 h1:/pyhkP1nLwjG3OM+VuaNJkQT/Pqq73WzB3aDN3Fx1sc= github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= diff --git a/listener.go b/listener.go index 3df47e1..71b91e7 100644 --- a/listener.go +++ b/listener.go @@ -93,7 +93,7 @@ func (l *listener) handleIncoming() { continue } - var connScope network.ConnectionScope + var connScope network.ConnectionManagementScope if l.rcmgr != nil { var err error connScope, err = l.rcmgr.OpenConnection(network.DirInbound, true) diff --git a/upgrader.go b/upgrader.go index 41b8550..d3ea2ab 100644 --- a/upgrader.go +++ b/upgrader.go @@ -76,7 +76,7 @@ func (u *Upgrader) UpgradeInbound(ctx context.Context, t transport.Transport, ma } // Upgrade upgrades the multiaddr/net connection into a full libp2p-transport connection. -func (u *Upgrader) Upgrade(ctx context.Context, t transport.Transport, maconn manet.Conn, dir network.Direction, p peer.ID, connScope network.ConnectionScope) (transport.CapableConn, error) { +func (u *Upgrader) Upgrade(ctx context.Context, t transport.Transport, maconn manet.Conn, dir network.Direction, p peer.ID, connScope network.ConnectionManagementScope) (transport.CapableConn, error) { if dir == network.DirOutbound && p == "" { return nil, ErrNilPeer }