Trait sc_consensus_slots::SlotWorker
source · [−]pub trait SlotWorker<B: BlockT> {
type OnSlot: Future<Output = Option<SlotResult<B>>>;
fn on_slot(
&mut self,
chain_head: B::Header,
slot_info: SlotInfo
) -> Self::OnSlot;
}
Expand description
A worker that should be invoked at every new slot.
The implementation should not make any assumptions of the slot being bound to the time or similar. The only valid assumption is that the slot number is always increasing.
Associated Types
type OnSlot: Future<Output = Option<SlotResult<B>>>
type OnSlot: Future<Output = Option<SlotResult<B>>>
The type of the future that will be returned when a new slot is triggered.