Skip to content

Commit

Permalink
chore: remove unused func
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Aug 16, 2024
1 parent 4c8f2a9 commit 3fba5cd
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
mplex "github.com/libp2p/go-libp2p-mplex"
record "github.com/libp2p/go-libp2p-record"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/peerstore"
"github.com/libp2p/go-libp2p/core/routing"
Expand Down Expand Up @@ -372,21 +371,3 @@ func execOnMany(ctx context.Context, waitFrac float64, timeoutPerOp time.Duratio
}
return numSuccess
}

// Given a list of connections to a peer, return the remote maddr of the direct connection
func getDirectMaddr(conns []network.Conn) multiaddr.Multiaddr {
if len(conns) == 0 {
return nil
}
outer:
for _, c := range conns {
for _, proto := range c.RemoteMultiaddr().Protocols() {
if proto.Name == "p2p-circuit" {
continue outer
}
}
return c.RemoteMultiaddr()

}
return nil
}

0 comments on commit 3fba5cd

Please sign in to comment.