Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
4b52be28
Commit
4b52be28
authored
Mar 02, 2015
by
Alex
Browse files
Fixed #780
parent
f71d1733
Changes
1
Hide whitespace changes
Inline
Side-by-side
peer/peer.go
View file @
4b52be28
...
...
@@ -39,10 +39,11 @@ func (id ID) Loggable() map[string]interface{} {
func
(
id
ID
)
String
()
string
{
pid
:=
id
.
Pretty
()
maxRunes
:=
6
if
len
(
pid
)
<
maxRunes
{
maxRunes
=
len
(
pid
)
skip
:=
2
//Added to skip past Qm which is identical for all SHA256 nodes
if
len
(
pid
)
<
maxRunes
+
skip
{
maxRunes
=
len
(
pid
)
-
skip
}
return
fmt
.
Sprintf
(
"<peer.ID %s>"
,
pid
[
:
maxRunes
])
return
fmt
.
Sprintf
(
"<peer.ID %s>"
,
pid
[
skip
:
maxRunes
+
skip
])
}
// MatchesPrivateKey tests whether this ID was derived from sk
...
...
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