peer.go
func (p *Peer) PubKey() crypto.PubKeyEd25519 {
	if p.config.AuthEnc {
		return p.conn.(*SecretConnection).RemotePubKey()
	}
	if p.NodeInfo == nil {
		panic("Attempt to get peer's PubKey before calling Handshake")
	}
	return p.PubKey()
}
func (p *Peer) PubKey() crypto.PubKeyEd25519 {
	if p.config.AuthEnc {
		return p.conn.(*SecretConnection).RemotePubKey()
	}
	if p.NodeInfo == nil {
		panic("Attempt to get peer's PubKey before calling Handshake")
	}
	return p.PubKey()
}
func ( p * Peer ) PubKey ( ) crypto . PubKeyEd25519 { if p . config . AuthEnc { return p . conn . ( * SecretConnection ) . RemotePubKey ( ) } if p . NodeInfo == nil { panic ( " " ) } return p . PubKey ( ) }
// PubKey returns peer's public key.
PubKey returns peer s public key .