code: func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Block,
  	stxos []blockchain.SpentTxOut) error {
  
  	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
  	}
  
  	return storeFilter(dbTx, block, f, wire.GCSFilterRegular)
  }
docs: // ConnectBlock is invoked by the index manager when a new block has been
  // connected to the main chain. This indexer adds a hash-to-cf mapping for
  // every passed block. This is part of the Indexer interface.