From ec94a776962ac42f96c6755c9dd8139761fef161 Mon Sep 17 00:00:00 2001 From: brendanedelson Date: Thu, 10 Nov 2022 18:03:03 -0500 Subject: [PATCH] add offchain worker to parachain config --- 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();