reth::providers

Trait BlockExecutionWriter

Source
pub trait BlockExecutionWriter:
    BlockWriter
    + Send
    + Sync {
    // Required methods
    fn take_block_and_execution_above(
        &self,
        block: u64,
        remove_transactions_from: StorageLocation,
    ) -> Result<Chain, ProviderError>;
    fn remove_block_and_execution_above(
        &self,
        block: u64,
        remove_transactions_from: StorageLocation,
    ) -> Result<(), ProviderError>;
}
Expand description

BlockExecution Writer

Required Methods§

Source

fn take_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<Chain, ProviderError>

Take all of the blocks above the provided number and their execution result

The passed block number will stay in the database.

Source

fn remove_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<(), ProviderError>

Remove all of the blocks above the provided number and their execution result

The passed block number will stay in the database.

Implementations on Foreign Types§

Source§

impl<'a, T> BlockExecutionWriter for &'a T

Source§

fn take_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<Chain, ProviderError>

Source§

fn remove_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<(), ProviderError>

Source§

impl<T> BlockExecutionWriter for Box<T>

Source§

fn take_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<Chain, ProviderError>

Source§

fn remove_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<(), ProviderError>

Source§

impl<T> BlockExecutionWriter for Arc<T>

Source§

fn take_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<Chain, ProviderError>

Source§

fn remove_block_and_execution_above( &self, block: u64, remove_transactions_from: StorageLocation, ) -> Result<(), ProviderError>

Implementors§

Source§

impl<TX, N> BlockExecutionWriter for DatabaseProvider<TX, N>
where TX: DbTxMut + DbTx + 'static, N: ProviderNodeTypes + 'static,