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 13, 2023
1 parent 0e4fd1b commit 12d1798
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 12d1798

Please sign in to comment.