Skip to main content

StateRootJob

Trait StateRootJob 

Source
pub trait StateRootJob<N: NodePrimitives>: Send {
    // Required methods
    fn name(&self) -> &'static str;
    fn finish(
        &mut self,
        block: &RecoveredBlock<N::Block>,
        output: Arc<BlockExecutionOutput<N::Receipt>>,
        hashed_state: &LazyHashedPostState,
    ) -> ProviderResult<StateRootJobOutcome>;
}
Expand description

Per-block state-root job prepared before execution and finished after execution.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable strategy name used in logs.

Source

fn finish( &mut self, block: &RecoveredBlock<N::Block>, output: Arc<BlockExecutionOutput<N::Receipt>>, hashed_state: &LazyHashedPostState, ) -> ProviderResult<StateRootJobOutcome>

Completes the job after execution.

Called at most once per prepared job; implementations may panic if called again.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§