From ebf5a3e8505a53e6e83a04f13ca572351c11b5bb Mon Sep 17 00:00:00 2001 From: David Hill Date: Mon, 17 Mar 2014 22:52:55 -0400 Subject: [PATCH] add peer to block and tx rejection debug messages. ok @davecgh --- blockmanager.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blockmanager.go b/blockmanager.go index 7ddc71ce..740c65bd 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -404,7 +404,8 @@ func (b *blockManager) handleTxMsg(tmsg *txMsg) { // so log it as such. Otherwise, something really did go wrong, // so log it as an actual error. if _, ok := err.(TxRuleError); ok { - bmgrLog.Debugf("Rejected transaction %v: %v", txHash, err) + bmgrLog.Debugf("Rejected transaction %v from %s: %v", txHash, + tmsg.peer, err) } else { bmgrLog.Errorf("Failed to process transaction %v: %v", txHash, err) } @@ -500,7 +501,8 @@ func (b *blockManager) handleBlockMsg(bmsg *blockMsg) { // it as such. Otherwise, something really did go wrong, so log // it as an actual error. if _, ok := err.(btcchain.RuleError); ok { - bmgrLog.Infof("Rejected block %v: %v", blockSha, err) + bmgrLog.Infof("Rejected block %v from %s: %v", blockSha, + bmsg.peer, err) } else { bmgrLog.Errorf("Failed to process block %v: %v", blockSha, err) }