diff --git a/p2p/muxer/yamux/yamux.go b/p2p/muxer/yamux/yamux.go index 55e45bdde3..4875761cf4 100644 --- a/p2p/muxer/yamux/yamux.go +++ b/p2p/muxer/yamux/yamux.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "net" - smux "github.com/libp2p/go-stream-muxer" + mux "github.com/libp2p/go-libp2p-core/mux" yamux "github.com/libp2p/go-yamux" ) @@ -24,7 +24,7 @@ func (c *conn) IsClosed() bool { } // OpenStream creates a new stream. -func (c *conn) OpenStream() (smux.Stream, error) { +func (c *conn) OpenStream() (mux.MuxedStream, error) { s, err := c.yamuxSession().OpenStream() if err != nil { return nil, err @@ -34,7 +34,7 @@ func (c *conn) OpenStream() (smux.Stream, error) { } // AcceptStream accepts a stream opened by the other side. -func (c *conn) AcceptStream() (smux.Stream, error) { +func (c *conn) AcceptStream() (mux.MuxedStream, error) { s, err := c.yamuxSession().AcceptStream() return s, err } @@ -61,7 +61,7 @@ func init() { DefaultTransport = (*Transport)(config) } -func (t *Transport) NewConn(nc net.Conn, isServer bool) (smux.Conn, error) { +func (t *Transport) NewConn(nc net.Conn, isServer bool) (mux.MuxedConn, error) { var s *yamux.Session var err error if isServer { diff --git a/p2p/muxer/yamux/yamux_test.go b/p2p/muxer/yamux/yamux_test.go index fbd0188b8d..409b0967c8 100644 --- a/p2p/muxer/yamux/yamux_test.go +++ b/p2p/muxer/yamux/yamux_test.go @@ -3,9 +3,9 @@ package sm_yamux import ( "testing" - test "github.com/libp2p/go-stream-muxer/test" + tmux "github.com/libp2p/go-libp2p-testing/suites/mux" ) func TestYamuxTransport(t *testing.T) { - test.SubtestAll(t, DefaultTransport) + tmux.SubtestAll(t, DefaultTransport) }