changes as per Bucky's review

This commit is contained in:
Anton Kaliaev
2017-05-12 23:07:53 +02:00
parent c9cd8de9c6
commit f8fdbe3dbc
24 changed files with 83 additions and 227 deletions

View File

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/tendermint/go-crypto"
crypto "github.com/tendermint/go-crypto"
)
const maxNodeInfoSize = 10240 // 10Kb
@ -68,6 +68,10 @@ func (info *NodeInfo) ListenPort() int {
return port_i
}
func (info NodeInfo) String() string {
return fmt.Sprintf("NodeInfo{pk: %v, moniker: %v, network: %v [remote %v, listen %v], version: %v (%v)}", info.PubKey, info.Moniker, info.Network, info.RemoteAddr, info.ListenAddr, info.Version, info.Other)
}
func splitVersion(version string) (string, string, string, error) {
spl := strings.Split(version, ".")
if len(spl) != 3 {