Browse Source

Fixed #780

pull/2/head
Alex 10 years ago
parent
commit
4b52be2807
  1. 7
      peer/peer.go

7
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("<peer.ID %s>", pid[:maxRunes])
return fmt.Sprintf("<peer.ID %s>", pid[skip:maxRunes + skip])
}
// MatchesPrivateKey tests whether this ID was derived from sk

Loading…
Cancel
Save