diff --git a/conn.go b/conn.go index a4ee0cb..4b8c0bc 100644 --- a/conn.go +++ b/conn.go @@ -13,7 +13,7 @@ type transportConn struct { network.ConnMultiaddrs network.ConnSecurity transport transport.Transport - stat network.Stat + stat network.ConnStats } func (t *transportConn) Transport() transport.Transport { @@ -35,6 +35,6 @@ func (t *transportConn) String() string { ) } -func (t *transportConn) Stat() network.Stat { +func (t *transportConn) Stat() network.ConnStats { return t.stat } diff --git a/go.mod b/go.mod index 5c41967..dad96d3 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.10.0 + github.com/libp2p/go-libp2p-core v0.13.0 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 210fa04..8e0df34 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.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= -github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= +github.com/libp2p/go-libp2p-core v0.13.0 h1:IFG/s8dN6JN2OTrXX9eq2wNU/Zlz2KLdwZUp5FplgXI= +github.com/libp2p/go-libp2p-core v0.13.0/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/upgrader.go b/upgrader.go index 22e7825..ff669c3 100644 --- a/upgrader.go +++ b/upgrader.go @@ -68,7 +68,7 @@ func (u *Upgrader) Upgrade(ctx context.Context, t transport.Transport, maconn ma if dir == network.DirOutbound && p == "" { return nil, ErrNilPeer } - var stat network.Stat + var stat network.ConnStats if cs, ok := maconn.(network.ConnStat); ok { stat = cs.Stat() }