Expand description
Transparent address index UTXO queries.
In the functions in this module:
The block write task commits blocks to the finalized state before updating
chain with a cached copy of the best non-finalized chain from
NonFinalizedState.chain_set. Then the block commit task can commit additional blocks to
the finalized state after we’ve cloned the chain.
This means that some blocks can be in both:
Structs§
- Address
Utxos - A convenience wrapper that efficiently stores unspent transparent outputs, and the corresponding transaction IDs.
Constants§
- ADDRESS_
HEIGHTS_ FULL_ RANGE - The full range of address heights.
Functions§
- address_
utxos - Returns the unspent transparent outputs (UTXOs) for the supplied
transparent::Addresses inquery_height_range, in chain order, at mostmax_entriesof them; and the transaction IDs for the transactions containing those UTXOs. - apply_
utxo_ 🔒changes - Combines the supplied finalized and non-finalized UTXOs, removes the spent UTXOs and the
UTXOs outside
query_height_range, truncates the result tomax_entries, and returns it. - chain_
transparent_ 🔒utxo_ changes - Returns the UTXO changes (created and spent) for
addressesin the non-finalized chain, matching or overlapping the UTXOs for thefinalized_tip_range. Also returns the height of the last block in which the changes were located, or None if the state is empty. - finalized_
address_ 🔒utxos - Returns the unspent transparent outputs (UTXOs) for
addressesin the finalized chain, and the finalized tip heights the UTXOs were queried at. - finalized_
scan_ 🔒limit - The number of UTXOs a limited finalized query has to ask for, when the caller wants
max_entriesof them and the non-finalized chain spendschain_spent_countof the addresses’ UTXOs. - lookup_
tx_ 🔒ids_ for_ utxos - Returns the
transaction::Hashes containing the supplied UTXOs, from the non-finalizedchainand finalizeddb.