Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
34c0e5c0
Commit
34c0e5c0
authored
Aug 08, 2020
by
Adin Schmahmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: sort addresses returned by ipfs id
parent
d6b94360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
core/commands/id.go
core/commands/id.go
+2
-0
No files found.
core/commands/id.go
View file @
34c0e5c0
...
...
@@ -168,6 +168,7 @@ func printPeer(ps pstore.Peerstore, p peer.ID) (interface{}, error) {
for
_
,
a
:=
range
addrs
{
info
.
Addresses
=
append
(
info
.
Addresses
,
a
.
String
())
}
sort
.
Strings
(
info
.
Addresses
)
protocols
,
_
:=
ps
.
GetProtocols
(
p
)
// don't care about errors here.
for
_
,
p
:=
range
protocols
{
...
...
@@ -209,6 +210,7 @@ func printSelf(node *core.IpfsNode) (interface{}, error) {
for
_
,
a
:=
range
addrs
{
info
.
Addresses
=
append
(
info
.
Addresses
,
a
.
String
())
}
sort
.
Strings
(
info
.
Addresses
)
info
.
Protocols
=
node
.
PeerHost
.
Mux
()
.
Protocols
()
sort
.
Strings
(
info
.
Protocols
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment