Unverified Commit c8d2a4e5 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #5645 from ipfs/fix/remove-p2p-circuit-swarm-hack

remove p2p-circuit addr hack in ipfs swarm peers
parents 7ecd6756 a561eca7
......@@ -6,7 +6,6 @@ import (
"io"
"path"
"sort"
"strings"
"github.com/ipfs/go-ipfs/commands"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
......@@ -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)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment