From 2dcd003722126d824b46f65f1f5671f60e15100e Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Thu, 3 Oct 2013 01:21:30 +0100 Subject: [PATCH] Print if a peer is inbound or outbound. This got lost in the peer logging rework. Pointed out by davec@. --- blockmanager.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockmanager.go b/blockmanager.go index b31faeba..b783fb3d 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -137,7 +137,14 @@ func (b *blockManager) handleNewPeerMsg(peers *list.List, p *peer) { 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. if p.services&btcwire.SFNodeNetwork != btcwire.SFNodeNetwork {