Skip to content

Commit

Permalink
Merge pull request #5645 from ipfs/fix/remove-p2p-circuit-swarm-hack
Browse files Browse the repository at this point in the history
remove p2p-circuit addr hack in ipfs swarm peers
  • Loading branch information
Stebalien authored Oct 25, 2018
2 parents 7ecd675 + a561eca commit c8d2a4e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions core/commands/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"io"
"path"
"sort"
"strings"

"github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
Expand Down Expand Up @@ -138,12 +137,7 @@ var swarmPeersCmd = &cmds.Command{

pipfs := ma.ProtocolWithCode(ma.P_IPFS).Name
for _, info := range ci.Peers {
ids := fmt.Sprintf("/%s/%s", pipfs, info.Peer)
if strings.HasSuffix(info.Addr, ids) {
fmt.Fprintf(w, "%s", info.Addr)
} else {
fmt.Fprintf(w, "%s%s", info.Addr, ids)
}
fmt.Fprintf(w, "%s/%s/%s", info.Addr, pipfs, info.Peer)
if info.Latency != "" {
fmt.Fprintf(w, " %s", info.Latency)
}
Expand Down

0 comments on commit c8d2a4e

Please sign in to comment.