From 49a9e394cf467784b23ca03be12067c0f1ef9cff Mon Sep 17 00:00:00 2001 From: brendanedelson Date: Fri, 11 Nov 2022 05:39:36 -0500 Subject: [PATCH] add offchain worker to parachain config (#1860) --- parachain-template/node/src/service.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/parachain-template/node/src/service.rs b/parachain-template/node/src/service.rs index eab33374529..0a0d1327e0e 100644 --- a/parachain-template/node/src/service.rs +++ b/parachain-template/node/src/service.rs @@ -210,6 +210,15 @@ async fn start_node_impl( warp_sync: None, })?; + if parachain_config.offchain_worker.enabled { + sc_service::build_offchain_workers( + ¶chain_config, + task_manager.spawn_handle(), + client.clone(), + network.clone(), + ); + } + let rpc_builder = { let client = client.clone(); let transaction_pool = transaction_pool.clone();