mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 09:50:08 +01:00
blockchain: pass in prevScript for constructing the basic filter
This commit is contained in:
parent
576800a99e
commit
102ca293f6
@ -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,
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user