From d6155a55e9654aec730ccfd0c5d03aa5131e0154 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 15 Aug 2018 17:22:50 -0700 Subject: [PATCH] chain: improve error when filtering blocks and transactions --- chain/bitcoind_client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chain/bitcoind_client.go b/chain/bitcoind_client.go index a136c00..75cc078 100644 --- a/chain/bitcoind_client.go +++ b/chain/bitcoind_client.go @@ -549,7 +549,8 @@ func (c *BitcoindClient) ntfnHandler() { select { case tx := <-c.zmqTxNtfns: if _, _, err := c.filterTx(tx, nil, true); err != nil { - log.Error(err) + log.Errorf("Unable to filter transaction %v: %v", + tx.TxHash(), err) } case newBlock := <-c.zmqBlockNtfns: // If the new block's previous hash matches the best @@ -566,7 +567,8 @@ func (c *BitcoindClient) ntfnHandler() { newBlock, newBlockHeight, true, ) if err != nil { - log.Error(err) + log.Errorf("Unable to filter block %v: %v", + newBlock.BlockHash(), err) continue }