Skip to content

Commit

Permalink
Merge pull request #73 from libp2p/remove-deprecated-types
Browse files Browse the repository at this point in the history
remove deprecated types
  • Loading branch information
Stebalien committed Jul 22, 2021
2 parents 9c9ee54 + 4e1ef58 commit 9a48259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions p2p/discovery/routing/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/libp2p/go-libp2p-core/discovery"
"time"

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

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/routing"
Expand All @@ -23,8 +23,8 @@ func NewRoutingDiscovery(router routing.ContentRouting) *RoutingDiscovery {
return &RoutingDiscovery{router}
}

func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...Option) (time.Duration, error) {
var options Options
func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...discovery.Option) (time.Duration, error) {
var options discovery.Options
err := options.Apply(opts...)
if err != nil {
return 0, err
Expand Down Expand Up @@ -56,8 +56,8 @@ func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...Opt
return ttl, nil
}

func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, opts ...Option) (<-chan peer.AddrInfo, error) {
var options Options
func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, opts ...discovery.Option) (<-chan peer.AddrInfo, error) {
var options discovery.Options
err := options.Apply(opts...)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion p2p/discovery/routing/routing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestRoutingDiscovery(t *testing.T) {
t.Fatal(err)
}

pis, err := FindPeers(ctx, d2, "/test", Limit(20))
pis, err := FindPeers(ctx, d2, "/test", discovery.Limit(20))
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 9a48259

Please sign in to comment.