Compare commits

...
2 changed files with 9 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ func NewConn(config ConnConfig, services ServiceDependencies) (*Conn, error) {
return nil, fmt.Errorf("allowed IPs is empty")
}
connLog := log.WithField("peer", config.Key)
connLog := log.WithField("peer", shortenKey(config.Key))
var conn = &Conn{
Log: connLog,
+8
View File
@@ -0,0 +1,8 @@
package peer
func shortenKey(pubKey string) string {
if len(pubKey) < 7 {
return pubKey
}
return pubKey[:7]
}