reth_provider

Trait ChainStateBlockWriter

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§

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

Saves the given finalized block number in the DB.

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

Saves the given safe block number in the DB.

Implementors§

Source§

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