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: SubspaceApi<Block, PublicKey>,
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.