From 0a841fefcf7d977694cbcdd017838ee5949916f6 Mon Sep 17 00:00:00 2001 From: pedro martelletto Date: Tue, 31 Jan 2017 09:53:00 +0000 Subject: [PATCH] Generate and store extended filters in ConnectBlock() --- blockchain/indexers/cfindex.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockchain/indexers/cfindex.go b/blockchain/indexers/cfindex.go index 5152db30..d8e50ed9 100644 --- a/blockchain/indexers/cfindex.go +++ b/blockchain/indexers/cfindex.go @@ -160,7 +160,15 @@ func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block, if err != nil { return err } - return dbStoreBasicEntry(dbTx, block.Hash(), f) + err = dbStoreBasicEntry(dbTx, block.Hash(), f) + if err != nil { + return err + } + f, err = makeExtendedFilterForBlock(block) + if err != nil { + return err + } + return dbStoreExtendedEntry(dbTx, block.Hash(), f) } // DisconnectBlock is invoked by the index manager when a block has been