|
|
@@ -757,7 +757,7 @@ running:
|
|
|
// The handshakes are done and it passed all checks.
|
|
|
p := srv.launchPeer(c)
|
|
|
peers[c.node.ID()] = p
|
|
|
- srv.log.Debug("Adding p2p peer", "peercount", len(peers), "id", p.ID(), "conn", c.flags, "addr", p.RemoteAddr(), "name", truncateName(c.name))
|
|
|
+ srv.log.Debug("Adding p2p peer", "peercount", len(peers), "id", p.ID(), "conn", c.flags, "addr", p.RemoteAddr(), "name", p.Name())
|
|
|
srv.dialsched.peerAdded(c)
|
|
|
if p.Inbound() {
|
|
|
inboundCount++
|
|
|
@@ -996,13 +996,6 @@ func nodeFromConn(pubkey *ecdsa.PublicKey, conn net.Conn) *enode.Node {
|
|
|
return enode.NewV4(pubkey, ip, port, port)
|
|
|
}
|
|
|
|
|
|
-func truncateName(s string) string {
|
|
|
- if len(s) > 20 {
|
|
|
- return s[:20] + "..."
|
|
|
- }
|
|
|
- return s
|
|
|
-}
|
|
|
-
|
|
|
// checkpoint sends the conn to run, which performs the
|
|
|
// post-handshake checks for the stage (posthandshake, addpeer).
|
|
|
func (srv *Server) checkpoint(c *conn, stage chan<- *conn) error {
|