Function sc_consensus_slots::start_slot_worker
source · pub async fn start_slot_worker<B, C, W, SO, CIDP, Proof>(
slot_duration: SlotDuration,
client: C,
worker: W,
sync_oracle: SO,
create_inherent_data_providers: CIDP,
)where
B: BlockT,
C: SelectChain<B>,
W: SlotWorker<B, Proof>,
SO: SyncOracle + Send,
CIDP: CreateInherentDataProviders<B, ()> + Send + 'static,
CIDP::InherentDataProviders: InherentDataProviderExt + Send,
Expand description
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.