Skip to content

Commit

Permalink
Merge pull request #30 from dryajov/fix/parse-src-addrs
Browse files Browse the repository at this point in the history
fix: dont error out on unknown addrs in peer info
  • Loading branch information
Stebalien committed Mar 11, 2018
2 parents 3f15e2c + 3e810f1 commit 3f04cba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions p2p/protocol/internal/circuitv1-deprecated/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ func peerToPeerInfo(p *pb.CircuitRelay_Peer) (pstore.PeerInfo, error) {
addrs := make([]ma.Multiaddr, len(p.Addrs))
for i := 0; i < len(addrs); i++ {
a, err := ma.NewMultiaddrBytes(p.Addrs[i])
if err != nil {
return pstore.PeerInfo{}, err
if err == nil {
addrs[i] = a
}
addrs[i] = a
}

return pstore.PeerInfo{ID: peer.ID(h), Addrs: addrs}, nil
Expand Down

0 comments on commit 3f04cba

Please sign in to comment.