Trait reth::beacon_consensus::hooks::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<Result<EngineHookEvent, RethError>>;
    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<Result<EngineHookEvent, RethError>>

Advances the hook execution, emitting an event.

source

fn db_access_level(&self) -> EngineHookDBAccessLevel

Returns db access level the hook needs.

Implementors§

source§

impl<DB> EngineHook for PruneHook<DB>
where DB: Database + 'static,

source§

impl<DB> EngineHook for StaticFileHook<DB>
where DB: Database + 'static,