update to go-libp2p-netutil
This commit is contained in:
parent
25b8aad61f
commit
32d57f202a
|
@ -10,8 +10,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
host "github.com/libp2p/go-libp2p-host"
|
host "github.com/libp2p/go-libp2p-host"
|
||||||
|
netutil "github.com/libp2p/go-libp2p-netutil"
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
peer "github.com/libp2p/go-libp2p-peer"
|
||||||
netutil "github.com/libp2p/go-libp2p/p2p/test/util"
|
bhost "github.com/libp2p/go-libp2p/p2p/host/basic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkMessageRouting(t *testing.T, topic string, pubs []*PubSub, subs []*Subscription) {
|
func checkMessageRouting(t *testing.T, topic string, pubs []*PubSub, subs []*Subscription) {
|
||||||
|
@ -34,7 +35,8 @@ func getNetHosts(t *testing.T, ctx context.Context, n int) []host.Host {
|
||||||
var out []host.Host
|
var out []host.Host
|
||||||
|
|
||||||
for i := 0; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
h := netutil.GenHostSwarm(t, ctx)
|
netw := netutil.GenSwarmNetwork(t, ctx)
|
||||||
|
h := bhost.New(netw)
|
||||||
out = append(out, h)
|
out = append(out, h)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
"hash": "Qmb6UFbVu1grhv5o5KnouvtZ6cqdrjXj6zLejAHWunxgCt",
|
"hash": "Qmb6UFbVu1grhv5o5KnouvtZ6cqdrjXj6zLejAHWunxgCt",
|
||||||
"name": "go-libp2p-host",
|
"name": "go-libp2p-host",
|
||||||
"version": "1.3.0"
|
"version": "1.3.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": "whyrusleeping",
|
||||||
|
"hash": "QmbUDXBMqSe4VCRgTMeAfyBh1T3GBnELEBXobZDL7cjVgs",
|
||||||
|
"name": "go-libp2p-netutil",
|
||||||
|
"version": "0.1.1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"gxVersion": "0.9.0",
|
"gxVersion": "0.9.0",
|
||||||
|
|
Loading…
Reference in New Issue