Skip to content

Commit

Permalink
Merge pull request ipfs/go-ipfs-routing#35 from nisainan/master
Browse files Browse the repository at this point in the history
chore: update go-libp2p to v0.22.0

This commit was moved from ipfs/go-ipfs-routing@0abc51b
  • Loading branch information
willscott authored Sep 19, 2022
2 parents 3cb06eb + c7a4817 commit 8169e7a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 35 deletions.
14 changes: 6 additions & 8 deletions routing/mock/centralized_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import (
"context"
"time"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/routing"
"github.com/libp2p/go-libp2p-testing/net"

tnet "github.com/libp2p/go-libp2p-testing/net"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/routing"
ma "github.com/multiformats/go-multiaddr"
)

Expand All @@ -22,13 +20,13 @@ type client struct {
peer tnet.Identity
}

// FIXME(brian): is this method meant to simulate putting a value into the network?
// PutValue FIXME(brian): is this method meant to simulate putting a value into the network?
func (c *client) PutValue(ctx context.Context, key string, val []byte, opts ...routing.Option) error {
log.Debugf("PutValue: %s", key)
return c.vs.PutValue(ctx, key, val, opts...)
}

// FIXME(brian): is this method meant to simulate getting a value from the network?
// GetValue FIXME(brian): is this method meant to simulate getting a value from the network?
func (c *client) GetValue(ctx context.Context, key string, opts ...routing.Option) ([]byte, error) {
log.Debugf("GetValue: %s", key)
return c.vs.GetValue(ctx, key, opts...)
Expand Down
10 changes: 4 additions & 6 deletions routing/mock/centralized_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import (
"sync"
"time"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-testing/net"

offline "github.com/ipfs/go-ipfs-routing/offline"
"github.com/ipfs/go-ipfs-routing/offline"
tnet "github.com/libp2p/go-libp2p-testing/net"
"github.com/libp2p/go-libp2p/core/peer"
)

// server is the mockrouting.Client's private interface to the routing server
Expand Down
5 changes: 2 additions & 3 deletions routing/mock/centralized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import (
"github.com/ipfs/go-cid"
delay "github.com/ipfs/go-ipfs-delay"
u "github.com/ipfs/go-ipfs-util"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-testing/net"
tnet "github.com/libp2p/go-libp2p-testing/net"
"github.com/libp2p/go-libp2p/core/peer"
)

func TestKeyNotFound(t *testing.T) {
Expand Down
7 changes: 3 additions & 4 deletions routing/mock/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (

ds "github.com/ipfs/go-datastore"
delay "github.com/ipfs/go-ipfs-delay"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/routing"
"github.com/libp2p/go-libp2p-testing/net"
tnet "github.com/libp2p/go-libp2p-testing/net"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/routing"
)

// MockValidator is a record validator that always returns success.
Expand Down
10 changes: 4 additions & 6 deletions routing/none/none_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import (
"context"
"errors"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"

"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/routing"

record "github.com/libp2p/go-libp2p-record"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/routing"
)

type nilclient struct {
Expand Down
10 changes: 4 additions & 6 deletions routing/offline/offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import (
"errors"
"time"

proto "github.com/gogo/protobuf/proto"
cid "github.com/ipfs/go-cid"
"github.com/gogo/protobuf/proto"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
dshelp "github.com/ipfs/go-ipfs-ds-help"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/routing"

record "github.com/libp2p/go-libp2p-record"
pb "github.com/libp2p/go-libp2p-record/pb"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/routing"
)

// ErrOffline is returned when trying to perform operations that
Expand Down
4 changes: 2 additions & 2 deletions routing/offline/offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
cid "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"

"github.com/libp2p/go-libp2p-core/routing"
"github.com/libp2p/go-libp2p-core/test"
"github.com/libp2p/go-libp2p/core/routing"
"github.com/libp2p/go-libp2p/core/test"

mh "github.com/multiformats/go-multihash"
)
Expand Down

0 comments on commit 8169e7a

Please sign in to comment.