Skip to content

Commit

Permalink
chore: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Aug 28, 2024
1 parent d149745 commit 5585d1c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions p2p/protocol/holepunch/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,8 @@ import (
"github.com/libp2p/go-libp2p/core/peer"

ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
)

func containsPublicAddr(addrs []ma.Multiaddr) bool {
for _, addr := range addrs {
if isRelayAddress(addr) || !manet.IsPublicAddr(addr) {
continue
}
return true
}
return false
}

func removeRelayAddrs(addrs []ma.Multiaddr) []ma.Multiaddr {
result := make([]ma.Multiaddr, 0, len(addrs))
for _, addr := range addrs {
Expand Down

0 comments on commit 5585d1c

Please sign in to comment.