Commit 80bc9251 authored by Brian Tiger Chow's avatar Brian Tiger Chow

style(peer) shorter ID when printing Peer

feel free to contest/revert if this becomes a problem

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent b799ddef
......@@ -161,11 +161,11 @@ type peer struct {
// codebase is known to be correct.
func (p *peer) String() string {
pid := p.id.String()
maxRunes := 12
maxRunes := 6
if len(pid) < maxRunes {
maxRunes = len(pid)
}
return "[Peer " + pid[:maxRunes] + "]"
return fmt.Sprintf("peer %s", pid[:maxRunes])
}
func (p *peer) Loggable() map[string]interface{} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment