diff --git a/peer.go b/peer.go index a68718d8..167cc24c 100644 --- a/peer.go +++ b/peer.go @@ -137,6 +137,7 @@ type peer struct { txProcessed chan bool blockProcessed chan bool quit chan bool + userAgent string } // String returns the peer's address and directionality as a human-readable @@ -248,6 +249,9 @@ func (p *peer) handleVersionMsg(msg *btcwire.MsgVersion) { // advertised. p.services = msg.Services + // Set the remote peer's user agent. + p.userAgent = msg.UserAgent + // Inbound connections. if p.inbound { // Send version.