Add the useragent to the new valid peer message.

This commit modifies the new valid peer message to display the useragent.
Previously this information was only available by setting the PEER
subsystem debuglevel to debug or lower.

This was prompted by #64.
This commit is contained in:
Dave Collins 2014-01-07 10:34:34 -06:00
parent 47c92c0e62
commit 34657d43d9

View file

@ -206,7 +206,7 @@ func (b *blockManager) handleNewPeerMsg(peers *list.List, p *peer) {
return
}
bmgrLog.Infof("New valid peer %s", p)
bmgrLog.Infof("New valid peer %s (%s)", p, p.userAgent)
// Ignore the peer if it's not a sync candidate.
if !b.isSyncCandidate(p) {