blockchain: pass in prevScript for constructing the basic filter
This commit is contained in:
parent
576800a99e
commit
102ca293f6
1 changed files with 6 additions and 1 deletions
|
@ -201,7 +201,12 @@ func storeFilter(dbTx database.Tx, block *btcutil.Block, f *gcs.Filter,
|
||||||
func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block,
|
func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block,
|
||||||
stxos []blockchain.SpentTxOut) error {
|
stxos []blockchain.SpentTxOut) error {
|
||||||
|
|
||||||
f, err := builder.BuildBasicFilter(block.MsgBlock())
|
prevScripts := make([][]byte, len(stxos))
|
||||||
|
for i, stxo := range stxos {
|
||||||
|
prevScripts[i] = stxo.PkScript
|
||||||
|
}
|
||||||
|
|
||||||
|
f, err := builder.BuildBasicFilter(block.MsgBlock(), prevScripts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue