Skip to content

Commit

Permalink
Remove offchain worker initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rakanalh committed Dec 18, 2023
1 parent a582c78 commit 71045d7
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub use sc_executor::NativeElseWasmExecutor;
use sc_network_common::service::NetworkEventStream;
pub use sc_service::ChainSpec;
pub use sp_api::ConstructRuntimeApi;
pub use sp_core::offchain::OffchainStorage;

type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
type FullGrandpaBlockImport<RuntimeApi, ExecutorDispatch> = sc_finality_grandpa::GrandpaBlockImport<
Expand Down Expand Up @@ -356,20 +355,6 @@ where

let basics = new_partial_basics::<RuntimeApi, ExecutorDispatch>(&config)?;

let mut offchain_storage = basics
.backend
.offchain_storage()
.expect("no off-chain storage, DDC validation is not possible");

offchain_storage.set(
sp_core::offchain::STORAGE_PREFIX,
b"enable-ddc-validation",
if enable_ddc_validation { &[1] } else { &[0] },
);
if let Some(dac_url) = dac_url {
offchain_storage.set(sp_core::offchain::STORAGE_PREFIX, b"dac-url", dac_url.as_bytes());
};

let sc_service::PartialComponents {
client,
backend,
Expand Down Expand Up @@ -409,15 +394,6 @@ where
warp_sync: Some(warp_sync),
})?;

if config.offchain_worker.enabled {
sc_service::build_offchain_workers(
&config,
task_manager.spawn_handle(),
client.clone(),
network.clone(),
);
}

let role = config.role.clone();
let force_authoring = config.force_authoring;
let backoff_authoring_blocks =
Expand Down

0 comments on commit 71045d7

Please sign in to comment.