reth::providers

Trait ChainStateBlockWriter

Source
pub trait ChainStateBlockWriter: Send + Sync {
    // Required methods
    fn save_finalized_block_number(
        &self,
        block_number: u64,
    ) -> Result<(), ProviderError>;
    fn save_safe_block_number(
        &self,
        block_number: u64,
    ) -> Result<(), ProviderError>;
}
Expand description

Functionality to write the last known chain blocks to the database.

Required Methods§

Source

fn save_finalized_block_number( &self, block_number: u64, ) -> Result<(), ProviderError>

Saves the given finalized block number in the DB.

Source

fn save_safe_block_number(&self, block_number: u64) -> Result<(), ProviderError>

Saves the given safe block number in the DB.

Implementors§

Source§

impl<TX, N> ChainStateBlockWriter for DatabaseProvider<TX, N>
where TX: DbTxMut, N: NodeTypes,