[][src]Trait sc_consensus_slots::SlotWorker

pub trait SlotWorker<B: BlockT> {
    type OnSlot: Future<Output = Result<(), Error>>;
    fn on_slot(
        &mut self,
        chain_head: B::Header,
        slot_info: SlotInfo
    ) -> Self::OnSlot; }

A worker that should be invoked at every new slot.

Associated Types

type OnSlot: Future<Output = Result<(), Error>>

The type of the future that will be returned when a new slot is triggered.

Loading content...

Required methods

fn on_slot(
    &mut self,
    chain_head: B::Header,
    slot_info: SlotInfo
) -> Self::OnSlot

Called when a new slot is triggered.

Loading content...

Implementors

Loading content...