Skip to main content

BlockExecutionWriter

Trait BlockExecutionWriter 

Source
pub trait BlockExecutionWriter: NodePrimitivesProvider<Primitives: NodePrimitives<Block = Self::Block>> + BlockWriter {
    // Required methods
    fn take_block_and_execution_above(
        &self,
        block: BlockNumber,
    ) -> ProviderResult<Chain<Self::Primitives>>;
    fn remove_block_and_execution_above(
        &self,
        block: BlockNumber,
    ) -> ProviderResult<()>;
}
Available on crate feature std only.
Expand description

BlockExecution Writer

Required Methods§

Source

fn take_block_and_execution_above( &self, block: BlockNumber, ) -> 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.

Source

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

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

The passed block number will stay in the database.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: BlockExecutionWriter> BlockExecutionWriter for &T

Source§

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

Source§

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

Implementors§