From 45ac58c124656f8b79df7a5ba9eef0f3acbceefc Mon Sep 17 00:00:00 2001 From: saiintbrisson Date: Thu, 29 Feb 2024 22:06:58 +0000 Subject: [PATCH] fix(try-runtime): make it compile! --- node/src/command.rs | 26 ++------------------------ runtime/Cargo.toml | 16 +++++++++------- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index a1d7d51da..1370dc2b3 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -194,31 +194,9 @@ pub fn run() -> sc_cli::Result<()> { } }) } - #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - use crate::service::ExecutorDispatch; - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task - // manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - Ok(( - cmd.run::::ExtendHostFunctions, - >>(), - task_manager, - )) - }) + Some(Subcommand::TryRuntime) => { + Err("TryRuntime is available through its own CLI now: ".into()) } - #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ - You can enable it with `--features try-runtime`." - .into()), Some(Subcommand::ChainInfo(cmd)) => { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| cmd.run::(&config)) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 0b667bd52..76b7598a9 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -148,21 +148,23 @@ runtime-benchmarks = [ "pallet-evm/runtime-benchmarks", ] try-runtime = [ - "frame-try-runtime/try-runtime", + "fp-self-contained/try-runtime", "frame-executive/try-runtime", - "frame-system/try-runtime", "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", "pallet-aura/try-runtime", "pallet-balances/try-runtime", + "pallet-base-fee/try-runtime", + "pallet-ethereum/try-runtime", + "pallet-evm-chain-id/try-runtime", + "pallet-evm/try-runtime", "pallet-grandpa/try-runtime", "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-multisig/try-runtime", + "pallet-subspace/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-utility/try-runtime", - "pallet-subspace/try-runtime", - "pallet-ethereum/try-runtime", - "pallet-evm/try-runtime", - "fp-self-contained/try-runtime", - # "pallet-hotfix-sufficients/runtime-benchmarks", ]