From ddfaed7f6fee84dd45b10c70bd78a4669f6621f5 Mon Sep 17 00:00:00 2001 From: pedro martelletto Date: Tue, 31 Jan 2017 09:56:07 +0000 Subject: [PATCH] Delete extended filters in DisconnectBlock() --- blockchain/indexers/cfindex.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blockchain/indexers/cfindex.go b/blockchain/indexers/cfindex.go index d8e50ed9..f39573dd 100644 --- a/blockchain/indexers/cfindex.go +++ b/blockchain/indexers/cfindex.go @@ -176,7 +176,11 @@ func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block, // mapping for every passed block. This is part of the Indexer interface. func (idx *CfIndex) DisconnectBlock(dbTx database.Tx, block *btcutil.Block, view *blockchain.UtxoViewpoint) error { - return dbDeleteBasicEntry(dbTx, block.Hash()) + err := dbDeleteBasicEntry(dbTx, block.Hash()) + if err != nil { + return err + } + return dbDeleteExtendedEntry(dbTx, block.Hash()) } func (idx *CfIndex) FilterByBlockHash(hash *chainhash.Hash, extended bool) ([]byte, error) {