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§
sourcefn poll(
&mut self,
cx: &mut Context<'_>,
ctx: EngineHookContext,
) -> Poll<Result<EngineHookEvent, RethError>>
fn poll( &mut self, cx: &mut Context<'_>, ctx: EngineHookContext, ) -> Poll<Result<EngineHookEvent, RethError>>
Advances the hook execution, emitting an event.
sourcefn db_access_level(&self) -> EngineHookDBAccessLevel
fn db_access_level(&self) -> EngineHookDBAccessLevel
Returns db access level the hook needs.