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
Chain
orNonFinalizedState
, and - the shared finalized
ZebraDb
reference.
Functions§
- Returns the
Utxo
fortransparent::OutPoint
, if it exists in any chain in thenon_finalized_state
, or in the finalizeddb
. - Returns the
Block
withblock::Hash
orHeight
, if it exists in the non-finalizedchain
or finalizeddb
. - Returns the
block::Header
withblock::Hash
orHeight
, if it exists in the non-finalizedchain
or finalizeddb
. - Returns a
MinedTx
for aTransaction
withtransaction::Hash
, if one exists in the non-finalizedchain
or finalizeddb
. - Returns the
Transaction
withtransaction::Hash
, if it exists in the non-finalizedchain
or finalizeddb
. - Returns the
transaction::Hash
es for the block withhash_or_height
, if it exists in the non-finalizedchain
or finalizeddb
. - Returns the
Utxo
fortransparent::OutPoint
, if it exists and is unspent in the non-finalizedchain
or finalizeddb
. - Returns the
Utxo
fortransparent::OutPoint
, if it exists in the non-finalizedchain
or finalizeddb
.