Generate and store extended filters in ConnectBlock()

This commit is contained in:
pedro martelletto 2017-01-31 09:53:00 +00:00 committed by Olaoluwa Osuntokun
parent cdb3d44fa8
commit 0a841fefcf

View file

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