From c388a1ae9b7a0eda40c1045b8a1a4ed572f9e7a4 Mon Sep 17 00:00:00 2001 From: Grigoriy Simonov Date: Wed, 26 Oct 2022 10:59:12 +0000 Subject: [PATCH] chore: return `DefaultRuntimeExecutor` to fix benchmarks --- --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -37,6 +37,8 @@ cli::{Cli, RelayChainCli, Subcommand}, service::{new_partial, start_node, start_dev_node}, }; +#[cfg(feature = "runtime-benchmarks")] +use crate::chain_spec::default_runtime; #[cfg(feature = "unique-runtime")] use crate::service::UniqueRuntimeExecutor; @@ -46,6 +48,9 @@ use crate::service::OpalRuntimeExecutor; +#[cfg(feature = "runtime-benchmarks")] +use crate::service::DefaultRuntimeExecutor; + use codec::Encode; use cumulus_primitives_core::ParaId; use cumulus_client_cli::generate_genesis_block; --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -83,6 +83,23 @@ /// Opal native executor instance. pub struct OpalRuntimeExecutor; +#[cfg(all(feature = "unique-runtime", feature = "runtime-benchmarks"))] +pub type DefaultRuntimeExecutor = UniqueRuntimeExecutor; + +#[cfg(all( + not(feature = "unique-runtime"), + feature = "quartz-runtime", + feature = "runtime-benchmarks" +))] +pub type DefaultRuntimeExecutor = QuartzRuntimeExecutor; + +#[cfg(all( + not(feature = "unique-runtime"), + not(feature = "quartz-runtime"), + feature = "runtime-benchmarks" +))] +pub type DefaultRuntimeExecutor = OpalRuntimeExecutor; + #[cfg(feature = "unique-runtime")] impl NativeExecutionDispatch for UniqueRuntimeExecutor { type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; -- gitstuff