Browse Source

stop using the deprecated go-multiaddr-net

pull/1463/head
Marten Seemann 4 years ago
parent
commit
b743906cf6
  1. 5
      p2p/net/upgrader/listener.go
  2. 5
      p2p/net/upgrader/listener_test.go
  3. 5
      p2p/net/upgrader/upgrader.go
  4. 6
      p2p/net/upgrader/upgrader_test.go

5
p2p/net/upgrader/listener.go

@ -5,11 +5,10 @@ import (
"fmt"
"sync"
"github.com/libp2p/go-libp2p-core/transport"
logging "github.com/ipfs/go-log"
tec "github.com/jbenet/go-temp-err-catcher"
manet "github.com/multiformats/go-multiaddr-net"
"github.com/libp2p/go-libp2p-core/transport"
manet "github.com/multiformats/go-multiaddr/net"
)
var log = logging.Logger("stream-upgrader")

5
p2p/net/upgrader/listener_test.go

@ -14,10 +14,9 @@ import (
"github.com/libp2p/go-libp2p-core/sec/insecure"
"github.com/libp2p/go-libp2p-core/transport"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net"
st "github.com/libp2p/go-libp2p-transport-upgrader"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
"github.com/stretchr/testify/require"
)

5
p2p/net/upgrader/upgrader.go

@ -4,18 +4,17 @@ import (
"context"
"errors"
"fmt"
"github.com/libp2p/go-libp2p-core/network"
"net"
"github.com/libp2p/go-libp2p-core/connmgr"
"github.com/libp2p/go-libp2p-core/mux"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
ipnet "github.com/libp2p/go-libp2p-core/pnet"
"github.com/libp2p/go-libp2p-core/sec"
"github.com/libp2p/go-libp2p-core/transport"
"github.com/libp2p/go-libp2p-pnet"
manet "github.com/multiformats/go-multiaddr-net"
manet "github.com/multiformats/go-multiaddr/net"
)
// ErrNilPeer is returned when attempting to upgrade an outbound connection

6
p2p/net/upgrader/upgrader_test.go

@ -13,11 +13,11 @@ import (
mplex "github.com/libp2p/go-libp2p-mplex"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr-net"
"github.com/stretchr/testify/require"
manet "github.com/multiformats/go-multiaddr/net"
st "github.com/libp2p/go-libp2p-transport-upgrader"
"github.com/stretchr/testify/require"
)
var (

Loading…
Cancel
Save