From f3bdb4b53c62b77ce7e90ee2ae7a5f73a900cf3c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 22 Apr 2022 18:07:10 +0100 Subject: [PATCH] switch from github.com/libp2p/go-libp2p-yamux to p2p/muxer/yamux --- config/muxer_test.go | 3 +-- defaults.go | 2 +- go.mod | 4 ++-- p2p/net/swarm/dial_worker_test.go | 2 +- p2p/net/swarm/testing/testing.go | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/config/muxer_test.go b/config/muxer_test.go index 76aada106..96de6e1f1 100644 --- a/config/muxer_test.go +++ b/config/muxer_test.go @@ -4,13 +4,12 @@ import ( "testing" bhost "github.com/libp2p/go-libp2p/p2p/host/basic" + yamux "github.com/libp2p/go-libp2p/p2p/muxer/yamux" swarmt "github.com/libp2p/go-libp2p/p2p/net/swarm/testing" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" - - yamux "github.com/libp2p/go-libp2p-yamux" ) func TestMuxerSimple(t *testing.T) { diff --git a/defaults.go b/defaults.go index 4c881114a..72ee19cb5 100644 --- a/defaults.go +++ b/defaults.go @@ -5,6 +5,7 @@ package libp2p import ( "crypto/rand" + yamux "github.com/libp2p/go-libp2p/p2p/muxer/yamux" "github.com/libp2p/go-libp2p/p2p/net/connmgr" quic "github.com/libp2p/go-libp2p/p2p/transport/quic" "github.com/libp2p/go-libp2p/p2p/transport/tcp" @@ -16,7 +17,6 @@ import ( "github.com/libp2p/go-libp2p-peerstore/pstoremem" rcmgr "github.com/libp2p/go-libp2p-resource-manager" tls "github.com/libp2p/go-libp2p-tls" - yamux "github.com/libp2p/go-libp2p-yamux" "github.com/multiformats/go-multiaddr" ) diff --git a/go.mod b/go.mod index 13441b6d4..6a804cb9a 100644 --- a/go.mod +++ b/go.mod @@ -28,12 +28,12 @@ require ( github.com/libp2p/go-libp2p-testing v0.9.2 github.com/libp2p/go-libp2p-tls v0.4.1 github.com/libp2p/go-libp2p-transport-upgrader v0.7.1 - github.com/libp2p/go-libp2p-yamux v0.9.1 github.com/libp2p/go-msgio v0.2.0 github.com/libp2p/go-netroute v0.2.0 github.com/libp2p/go-reuseport v0.1.0 github.com/libp2p/go-reuseport-transport v0.1.0 github.com/libp2p/go-stream-muxer-multistream v0.4.0 + github.com/libp2p/go-yamux/v3 v3.1.1 github.com/libp2p/zeroconf/v2 v2.1.1 github.com/lucas-clemente/quic-go v0.27.0 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd @@ -85,11 +85,11 @@ require ( github.com/libp2p/go-libp2p-pnet v0.2.0 // indirect github.com/libp2p/go-libp2p-quic-transport v0.17.0 // indirect github.com/libp2p/go-libp2p-swarm v0.10.2 // indirect + github.com/libp2p/go-libp2p-yamux v0.9.1 // indirect github.com/libp2p/go-mplex v0.4.0 // indirect github.com/libp2p/go-nat v0.1.0 // indirect github.com/libp2p/go-openssl v0.0.7 // indirect github.com/libp2p/go-tcp-transport v0.5.1 // indirect - github.com/libp2p/go-yamux/v3 v3.1.1 // indirect github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect diff --git a/p2p/net/swarm/dial_worker_test.go b/p2p/net/swarm/dial_worker_test.go index 2fec019a8..b90092c54 100644 --- a/p2p/net/swarm/dial_worker_test.go +++ b/p2p/net/swarm/dial_worker_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + yamux "github.com/libp2p/go-libp2p/p2p/muxer/yamux" quic "github.com/libp2p/go-libp2p/p2p/transport/quic" "github.com/libp2p/go-libp2p/p2p/transport/tcp" @@ -19,7 +20,6 @@ import ( "github.com/libp2p/go-libp2p-peerstore/pstoremem" tnet "github.com/libp2p/go-libp2p-testing/net" tptu "github.com/libp2p/go-libp2p-transport-upgrader" - yamux "github.com/libp2p/go-libp2p-yamux" msmux "github.com/libp2p/go-stream-muxer-multistream" ma "github.com/multiformats/go-multiaddr" diff --git a/p2p/net/swarm/testing/testing.go b/p2p/net/swarm/testing/testing.go index c529e814b..70359b025 100644 --- a/p2p/net/swarm/testing/testing.go +++ b/p2p/net/swarm/testing/testing.go @@ -4,6 +4,7 @@ import ( "testing" "time" + yamux "github.com/libp2p/go-libp2p/p2p/muxer/yamux" "github.com/libp2p/go-libp2p/p2p/net/swarm" quic "github.com/libp2p/go-libp2p/p2p/transport/quic" "github.com/libp2p/go-libp2p/p2p/transport/tcp" @@ -22,7 +23,6 @@ import ( "github.com/libp2p/go-libp2p-peerstore/pstoremem" tnet "github.com/libp2p/go-libp2p-testing/net" tptu "github.com/libp2p/go-libp2p-transport-upgrader" - yamux "github.com/libp2p/go-libp2p-yamux" msmux "github.com/libp2p/go-stream-muxer-multistream" ma "github.com/multiformats/go-multiaddr" "github.com/stretchr/testify/require"