Function sc_proof_of_time::start_slot_worker

source ยท
pub async fn start_slot_worker<Block, Client, SC, Worker, SO, CIDP>(
    slot_duration: SlotDuration,
    client: Arc<Client>,
    select_chain: SC,
    worker: Worker,
    sync_oracle: SO,
    create_inherent_data_providers: CIDP,
    slot_info_stream: PotSlotInfoStream,
)
where Block: BlockT, Client: ProvideRuntimeApi<Block> + HeaderBackend<Block>, Client::Api: SubspaceRuntimeApi<Block, FarmerPublicKey>, SC: SelectChain<Block>, Worker: PotSlotWorker<Block> + SimpleSlotWorker<Block> + Send + Sync, SO: SyncOracle + Send, CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,
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.