reth_provider

Trait BlockExecutionWriter

Source
pub trait BlockExecutionWriter:
    NodePrimitivesProvider<Primitives: NodePrimitives<Block = Self::Block>>
    + BlockWriter
    + Send
    + Sync {
    // Required methods
    fn take_block_and_execution_above(
        &self,
        block: BlockNumber,
        remove_from: StorageLocation,
    ) -> ProviderResult<Chain<Self::Primitives>>;
    fn remove_block_and_execution_above(
        &self,
        block: BlockNumber,
        remove_from: StorageLocation,
    ) -> ProviderResult<()>;
}
Expand description

BlockExecution Writer

Required Methods§

Source

fn take_block_and_execution_above( &self, block: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult<Chain<Self::Primitives>>

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

The passed block number will stay in the database.

Accepts StorageLocation specifying from where should transactions and receipts be removed.

Source

fn remove_block_and_execution_above( &self, block: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult<()>

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

The passed block number will stay in the database.

Accepts StorageLocation specifying from where should transactions and receipts be removed.

Implementations on Foreign Types§

Source§

impl<T: BlockExecutionWriter> BlockExecutionWriter for &T

Source§

fn take_block_and_execution_above( &self, block: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult<Chain<Self::Primitives>>

Source§

fn remove_block_and_execution_above( &self, block: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult<()>

Implementors§

Source§

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