Skip to content

Commit

Permalink
update go-libp2p-circuit, remove peer address formatting kludge
Browse files Browse the repository at this point in the history
go-libp2p-circuit now reports partial p2p-circuit address

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
  • Loading branch information
vyzo committed Jul 29, 2017
1 parent e9fa416 commit d2dea51
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions core/commands/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io"
"path"
"sort"
"strings"

cmds "github.com/ipfs/go-ipfs/commands"
repo "github.com/ipfs/go-ipfs/repo"
Expand Down Expand Up @@ -129,11 +128,7 @@ var swarmPeersCmd = &cmds.Command{

buf := new(bytes.Buffer)
for _, info := range ci.Peers {
if strings.Contains(info.Addr, "/p2p-circuit/") {
fmt.Fprintf(buf, "%s", info.Addr)
} else {
fmt.Fprintf(buf, "%s/ipfs/%s", info.Addr, info.Peer)
}
fmt.Fprintf(buf, "%s/ipfs/%s", info.Addr, info.Peer)
if info.Latency != "" {
fmt.Fprintf(buf, " %s", info.Latency)
}
Expand Down
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ import (
swarm "gx/ipfs/QmSx9mhEnKWDkgBYaEY6MZFFajUtiQJ8bipSZhzPuALSPv/go-libp2p-swarm"
b58 "gx/ipfs/QmT8rehPR3F6bmwL6zjUN8XpiDBFFpMP2myPdC6ApsWfJf/go-base58"
cid "gx/ipfs/QmTprEaAA2A9bst5XH7exuyi5KzNMK3SEDNN8rBDnKWcUS/go-cid"
circuit "gx/ipfs/QmVEPsD9h95ToAC7NJpYopFcXyjVJm35xV4tw43J5JdCnL/go-libp2p-circuit"
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
metrics "gx/ipfs/QmVjRAPfRtResCMCE4eBqr4Beoa6A89P1YweG9wUS6RqUL/go-libp2p-metrics"
ma "gx/ipfs/QmXY77cVe7rVRQXZZQRioukUM7aRW3BTcAgJe12MCtb3Ji/go-multiaddr"
peer "gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
floodsub "gx/ipfs/QmYFCNMYp7fR9p2pHDXPGtawfoAYEwrR9GLQbihkB96Krs/floodsub"
ic "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
yamux "gx/ipfs/Qmbn7RYyWzBVXiUp9jZ1dA4VADHy9DtS7iZLwfhEUQvm3U/go-smux-yamux"
circuit "gx/ipfs/QmbqVLSFKrwKKBJeea2P47t68Na2of25scTMrbzJUqJBWQ/go-libp2p-circuit"
addrutil "gx/ipfs/Qmcx4KoZ91XS6izLjdkujAMAunAS1YuTgfgASgYaZF5GkR/go-addr-util"
smux "gx/ipfs/QmeZBgYBHvxMukGK5ojg28BCNLB9SeXqT7XXg6o7r2GbJy/go-stream-muxer"
)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@
},
{
"author": "vyzo",
"hash": "QmVEPsD9h95ToAC7NJpYopFcXyjVJm35xV4tw43J5JdCnL",
"hash": "QmbqVLSFKrwKKBJeea2P47t68Na2of25scTMrbzJUqJBWQ",
"name": "go-libp2p-circuit",
"version": "1.1.1"
"version": "1.1.2"
}
],
"gxVersion": "0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/ipfsaddr/ipfsaddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

path "github.com/ipfs/go-ipfs/path"
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
circuit "gx/ipfs/QmVEPsD9h95ToAC7NJpYopFcXyjVJm35xV4tw43J5JdCnL/go-libp2p-circuit"
peer "gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
circuit "gx/ipfs/QmbqVLSFKrwKKBJeea2P47t68Na2of25scTMrbzJUqJBWQ/go-libp2p-circuit"
)

var log = logging.Logger("ipfsaddr")
Expand Down

0 comments on commit d2dea51

Please sign in to comment.