pub trait SlotHooks<Da: DaSpec> {
    type Context: Context;

    // Required methods
    fn begin_slot_hook(
        &self,
        slot_header: &Da::BlockHeader,
        validity_condition: &Da::ValidityCondition,
        working_set: &mut WorkingSet<<Self::Context as Spec>::Storage>
    );
    fn end_slot_hook(
        &self,
        working_set: &mut WorkingSet<<Self::Context as Spec>::Storage>
    );
    fn finalize_slot_hook(
        &self,
        root_hash: [u8; 32],
        accesorry_working_set: &mut AccessoryWorkingSet<'_, <Self::Context as Spec>::Storage>
    );
}
Expand description

Hooks that execute during the StateTransitionFunction::begin_slot and end_slot functions.

Required Associated Types§

Required Methods§

source

fn begin_slot_hook( &self, slot_header: &Da::BlockHeader, validity_condition: &Da::ValidityCondition, working_set: &mut WorkingSet<<Self::Context as Spec>::Storage> )

source

fn end_slot_hook( &self, working_set: &mut WorkingSet<<Self::Context as Spec>::Storage> )

source

fn finalize_slot_hook( &self, root_hash: [u8; 32], accesorry_working_set: &mut AccessoryWorkingSet<'_, <Self::Context as Spec>::Storage> )

Implementors§