@cryptotaxi247 / kubo / commits / ee449cb88

Fixed #780

Alex committed Mar 2, 2015 at 23:53 UTC ee449cb884b9bd82c27bfa209e8cf79202e4c9ac
1 file changed +4 -3
p2p/peer/peer.go
+4 -3
@@ -39,10 +39,11 @@ func (id ID) Loggable() map[string]interface{} {
39 func (id ID) String() string {
40 pid := id.Pretty()
41 maxRunes := 6
42 - if len(pid) < maxRunes {
43 - maxRunes = len(pid)
42 + skip := 2 //Added to skip past Qm which is identical for all SHA256 nodes
43 + if len(pid) < maxRunes + skip {
44 + maxRunes = len(pid) - skip
45 }
45 - return fmt.Sprintf("<peer.ID %s>", pid[:maxRunes])
46 + return fmt.Sprintf("<peer.ID %s>", pid[skip:maxRunes + skip])
47 }
48
49 // MatchesPrivateKey tests whether this ID was derived from sk