Expand description
Shared block, header, and transaction reading code.
In the functions in this module:
The block write task commits blocks to the finalized state before updating
chain or non_finalized_state with a cached copy of the non-finalized chains
in NonFinalizedState.chain_set. Then the block commit task can
commit additional blocks to the finalized state after we’ve cloned the
chain or non_finalized_state.
This means that some blocks can be in both:
- the cached
ChainorNonFinalizedState, and - the shared finalized
ZebraDbreference.
Functions§
- any_
utxo - Returns the
Utxofortransparent::OutPoint, if it exists in any chain in thenon_finalized_state, or in the finalizeddb. - block
- Returns the
Blockwithblock::HashorHeight, if it exists in the non-finalizedchainor finalizeddb. - block_
and_ size - Returns the
Blockwithblock::HashorHeight, if it exists in the non-finalizedchainor finalizeddb. - block_
header - Returns the
block::Headerwithblock::HashorHeight, if it exists in the non-finalizedchainor finalizeddb. - block_
info - Returns the
BlockInfowithblock::HashorHeight, if it exists in the non-finalizedchainor finalizeddb. - mined_
transaction - Returns a
MinedTxfor aTransactionwithtransaction::Hash, if one exists in the non-finalizedchainor finalizeddb. - spending_
transaction_ hash - Returns the
Hashof the transaction that spent an output at the providedtransparent::OutPointor revealed the provided nullifier, if it exists and is spent or revealed in the non-finalizedchainor finalizeddband its spending transaction hash has been indexed. - transaction 🔒
- Returns the
Transactionwithtransaction::Hash, if it exists in the non-finalizedchainor finalizeddb. - transaction_
hashes_ for_ block - Returns the
transaction::Hashes for the block withhash_or_height, if it exists in the non-finalizedchainor finalizeddb. - unspent_
utxo - Returns the
Utxofortransparent::OutPoint, if it exists and is unspent in the non-finalizedchainor finalizeddb. - utxo
- Returns the
Utxofortransparent::OutPoint, if it exists in the non-finalizedchainor finalizeddb.