Function sc_consensus_slots::start_slot_worker[][src]

pub fn start_slot_worker<B, C, W, T, SO, SC, CAW>(
    slot_duration: SlotDuration<T>,
    client: C,
    worker: W,
    sync_oracle: SO,
    inherent_data_providers: InherentDataProviders,
    timestamp_extractor: SC,
    can_author_with: CAW
) -> impl Future<Output = ()> where
    B: BlockT,
    C: SelectChain<B>,
    W: SlotWorker<B>,
    W::OnSlot: Unpin,
    SO: SyncOracle + Send,
    SC: SlotCompatible + Unpin,
    T: SlotData + Clone,
    CAW: CanAuthorWith<B> + Send

Start a new slot worker.

Every time a new slot is triggered, worker.on_slot is called and the future it returns is polled until completion, unless we are major syncing.