reth_beacon_consensus::hooks

Trait EngineHook

Source
pub trait EngineHook:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn poll(
        &mut self,
        cx: &mut Context<'_>,
        ctx: EngineHookContext,
    ) -> Poll<RethResult<EngineHookEvent>>;
    fn db_access_level(&self) -> EngineHookDBAccessLevel;
}
Expand description

Hook that will be run during the main loop of consensus engine.

Required Methods§

Source

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

Returns a human-readable name for the hook.

Source

fn poll( &mut self, cx: &mut Context<'_>, ctx: EngineHookContext, ) -> Poll<RethResult<EngineHookEvent>>

Advances the hook execution, emitting an event.

Source

fn db_access_level(&self) -> EngineHookDBAccessLevel

Returns db access level the hook needs.

Implementors§

Source§

impl<PF> EngineHook for PruneHook<PF>

Source§

impl<Provider> EngineHook for StaticFileHook<Provider>
where Provider: StaticFileProviderFactory + DatabaseProviderFactory<Provider: StaticFileProviderFactory<Primitives: NodePrimitives<SignedTx: Value + Compact, BlockHeader: Value + Compact, Receipt: Value + Compact>> + StageCheckpointReader + BlockReader + ChainStateBlockReader> + 'static,