chain: improve error when filtering blocks and transactions

This commit is contained in:
Wilmer Paulino 2018-08-15 17:22:50 -07:00
parent 5f7060dadf
commit d6155a55e9
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -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
}