Merge pull request #2 from berty/feat/bump-libp2p

feat: bump libp2p
This commit is contained in:
Guilhem Fanton 2021-09-15 15:31:38 +02:00 committed by GitHub
commit 7b54d608d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 610 additions and 157 deletions

View File

@ -318,7 +318,7 @@ func (db *DB) Discover(ns string, cookie []byte, limit int) ([]dbi.RegistrationR
return nil, nil, err
}
p, err = peer.IDB58Decode(rid)
p, err = peer.Decode(rid)
if err != nil {
log.Errorf("error decoding peer id: %s", err.Error())
continue

View File

@ -126,12 +126,12 @@ func TestDBRegistrationAndDiscovery(t *testing.T) {
t.Fatal(err)
}
p1, err := peer.IDB58Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
p1, err := peer.Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
if err != nil {
t.Fatal(err)
}
p2, err := peer.IDB58Decode("QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi")
p2, err := peer.Decode("QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi")
if err != nil {
t.Fatal(err)
}
@ -297,12 +297,12 @@ func TestDBRegistrationAndDiscoveryMultipleNS(t *testing.T) {
t.Fatal(err)
}
p1, err := peer.IDB58Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
p1, err := peer.Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
if err != nil {
t.Fatal(err)
}
p2, err := peer.IDB58Decode("QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi")
p2, err := peer.Decode("QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi")
if err != nil {
t.Fatal(err)
}
@ -464,7 +464,7 @@ func TestDBCleanup(t *testing.T) {
t.Fatal(err)
}
p1, err := peer.IDB58Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
p1, err := peer.Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
if err != nil {
t.Fatal(err)
}

10
go.mod
View File

@ -3,11 +3,11 @@ module github.com/libp2p/go-libp2p-rendezvous
go 1.15
require (
github.com/gogo/protobuf v1.3.1
github.com/ipfs/go-log/v2 v2.1.1
github.com/gogo/protobuf v1.3.2
github.com/ipfs/go-log/v2 v2.1.3
github.com/libp2p/go-libp2p-blankhost v0.2.0
github.com/libp2p/go-libp2p-core v0.6.1
github.com/libp2p/go-libp2p-swarm v0.2.8
github.com/libp2p/go-libp2p-core v0.10.0
github.com/libp2p/go-libp2p-swarm v0.6.0
github.com/mattn/go-sqlite3 v1.14.4
github.com/multiformats/go-multiaddr v0.3.1
github.com/multiformats/go-multiaddr v0.4.0
)

741
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ func getNetHosts(t *testing.T, ctx context.Context, n int) []host.Host {
var out []host.Host
for i := 0; i < n; i++ {
netw := testutil.GenSwarm(t, ctx)
netw := testutil.GenSwarm(t)
h := bhost.NewBlankHost(netw)
out = append(out, h)
}
@ -232,7 +232,7 @@ func TestSVCErrors(t *testing.T) {
t.Fatal("expected E_INVALID_PEER_INFO")
}
p, err := peer.IDB58Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
p, err := peer.Decode("QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH")
if err != nil {
t.Fatal(err)
}