Grab the remote peer's user agent.

This commit is contained in:
David Hill 2013-10-29 16:25:08 -04:00 committed by Owain G. Ainsworth
parent 59e2b204a3
commit 4f25d45e77

View file

@ -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.