Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Jul 18, 2023
1 parent 7f116db commit 44e2b64
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions pkg/dtrack/distance_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/ipni/go-libipni/pcache"
"github.com/ipni/ipni-cli/pkg/adpub"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/multiformats/go-multiaddr"
)

type DistanceUpdate struct {
Expand All @@ -28,13 +27,11 @@ const (
)

type distTrack struct {
dist int
head cid.Cid
ad cid.Cid
client adpub.Client
publisher peer.AddrInfo
err error
errType int
dist int
head cid.Cid
ad cid.Cid
err error
errType int
}

func RunDistanceTracker(ctx context.Context, include, exclude map[peer.ID]struct{}, provCache *pcache.ProviderCache, updateIn time.Duration) <-chan DistanceUpdate {
Expand Down Expand Up @@ -223,15 +220,3 @@ func updateTrack(ctx context.Context, pid peer.ID, track *distTrack, provCache *
Distance: track.dist,
}
}

func maddrsEqual(a, b []multiaddr.Multiaddr) bool {
if len(a) != len(b) {
return false
}
for i := range a {
if !a[i].Equal(b[i]) {
return false
}
}
return true
}

0 comments on commit 44e2b64

Please sign in to comment.