BlockExecutionWriter

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,
    ) -> ProviderResult<Chain<Self::Primitives>>;
    fn remove_block_and_execution_above(
        &self,
        block: BlockNumber,
    ) -> ProviderResult<()>;
}
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.

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§