@cryptotaxi247 / kubo / commits / 34c0e5c0f

fix: sort addresses returned by ipfs id

Adin Schmahmann committed Aug 8, 2020 at 21:39 UTC 34c0e5c0f60118dcb8fd3b7fd24d627483a07589
1 file changed +2
core/commands/id.go
+2
@@ -168,6 +168,7 @@ func printPeer(ps pstore.Peerstore, p peer.ID) (interface{}, error) {
168 for _, a := range addrs {
169 info.Addresses = append(info.Addresses, a.String())
170 }
171 + sort.Strings(info.Addresses)
172
173 protocols, _ := ps.GetProtocols(p) // don't care about errors here.
174 for _, p := range protocols {
@@ -209,6 +210,7 @@ func printSelf(node *core.IpfsNode) (interface{}, error) {
210 for _, a := range addrs {
211 info.Addresses = append(info.Addresses, a.String())
212 }
213 + sort.Strings(info.Addresses)
214 info.Protocols = node.PeerHost.Mux().Protocols()
215 sort.Strings(info.Protocols)
216 }