From 4f25d45e77cc06119175086e57f2b4d0e31ce379 Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 29 Oct 2013 16:25:08 -0400 Subject: [PATCH] Grab the remote peer's user agent. --- peer.go | 4 ++++ 1 file changed, 4 insertions(+) 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.