pub trait ChainStateBlockReader: Send + Sync {
// Required methods
fn last_finalized_block_number(&self) -> ProviderResult<Option<BlockNumber>>;
fn last_safe_block_number(&self) -> ProviderResult<Option<BlockNumber>>;
}
Expand description
Functionality to read the last known chain blocks from the database.
Required Methods§
Sourcefn last_finalized_block_number(&self) -> ProviderResult<Option<BlockNumber>>
fn last_finalized_block_number(&self) -> ProviderResult<Option<BlockNumber>>
Returns the last finalized block number.
If no finalized block has been written yet, this returns None
.
Sourcefn last_safe_block_number(&self) -> ProviderResult<Option<BlockNumber>>
fn last_safe_block_number(&self) -> ProviderResult<Option<BlockNumber>>
Returns the last safe block number.
If no safe block has been written yet, this returns None
.