OSDN Git Service

feat: add node discovery and status check (#374)
[bytom/vapor.git] / p2p / peer.go
index 856d1e9..fbb663b 100644 (file)
@@ -194,6 +194,11 @@ func (p *Peer) IsLAN() bool {
        return p.isLAN
 }
 
+// Moniker returns peer's moniker.
+func (p *Peer) Moniker() string {
+       return p.NodeInfo.Moniker
+}
+
 // PubKey returns peer's public key.
 func (p *Peer) PubKey() string {
        return p.conn.(*connection.SecretConnection).RemotePubKey().String()