From 4b52be2807abf2a6b28a184c2328dbbef55c0071 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 2 Mar 2015 23:53:30 -0800 Subject: [PATCH] Fixed #780 --- peer/peer.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/peer/peer.go b/peer/peer.go index 9491effbc..1d94ebeaa 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -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("", pid[:maxRunes]) + return fmt.Sprintf("", pid[skip:maxRunes + skip]) } // MatchesPrivateKey tests whether this ID was derived from sk