Print if a peer is inbound or outbound.

This got lost in the peer logging rework. Pointed out by davec@.
This commit is contained in:
Owain G. Ainsworth 2013-10-03 01:21:30 +01:00
parent eb667fdf83
commit 2dcd003722

View file

@ -137,7 +137,14 @@ func (b *blockManager) handleNewPeerMsg(peers *list.List, p *peer) {
return return
} }
log.Infof("[BMGR] New valid peer %s", p.addr) var boundness string
if p.inbound {
boundness = "inbound"
} else {
boundness = "outbound"
}
log.Infof("[BMGR] New valid peer %s (%s)", p.addr, boundness)
// The peer is not a candidate for sync if it's not a full node. // The peer is not a candidate for sync if it's not a full node.
if p.services&btcwire.SFNodeNetwork != btcwire.SFNodeNetwork { if p.services&btcwire.SFNodeNetwork != btcwire.SFNodeNetwork {