Function sc_service::build_offchain_workers [−][src]
pub fn build_offchain_workers<TBl, TBackend, TCl>(
config: &Configuration,
backend: Arc<TBackend>,
spawn_handle: SpawnTaskHandle,
client: Arc<TCl>,
network: Arc<NetworkService<TBl, <TBl as BlockT>::Hash>>
) -> Option<Arc<OffchainWorkers<TCl, TBackend::OffchainStorage, TBl>>> where
TBl: BlockT,
TBackend: Backend<TBl>,
<TBackend as Backend<TBl>>::OffchainStorage: 'static,
TCl: Send + Sync + ProvideRuntimeApi<TBl> + BlockchainEvents<TBl> + 'static,
<TCl as ProvideRuntimeApi<TBl>>::Api: OffchainWorkerApi<TBl>,
Build a shared offchain workers instance.