Unverified Commit 637034f7 authored by Zeke Mostov's avatar Zeke Mostov Committed by kianenigma
Browse files

Companion to #8966 (#3186)

* update rustls to be compat with jsronrpsee 0.2.0

* Stub try-cli when feat not enabled

* update Substrate

Co-authored-by: parity-processbot <>
parent ca342d4e
This diff is collapsed.
......@@ -53,10 +53,14 @@ pub enum Subcommand {
)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
/// Testing subcommand for runtime testing and trying.
/// Try some command against runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),
/// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
#[cfg(not(feature = "try-runtime"))]
TryRuntime,
/// Key management cli utilities
Key(sc_cli::KeySubcommand),
}
......
......@@ -295,13 +295,32 @@ pub fn run() -> Result<()> {
cmd.run::<
service::kusama_runtime::Block,
service::KusamaExecutor,
>(config).map_err(Error::SubstrateCli),
task_manager
))
// NOTE: we fetch only the block number from the block type, the chance of disparity
// between kusama's and polkadot's block number is small enough to overlook this.
>(config).map_err(Error::SubstrateCli), task_manager))
})
}
#[cfg(feature = "westend-native")]
if chain_spec.is_westend() {
return runner.async_run(|config| {
Ok((cmd.run::<
service::westend_runtime::Block,
service::WestendExecutor,
>(config).map_err(Error::SubstrateCli), task_manager))
})
}
// else we assume it is polkadot.
runner.async_run(|config| {
Ok((cmd.run::<
service::polkadot_runtime::Block,
service::PolkadotExecutor,
>(config).map_err(Error::SubstrateCli), task_manager))
})
}
},
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => {
Err(Error::Other("TryRuntime wasn't enabled when building the node. \
You can enable it with `--features try-runtime`.".into()).into())
},
}?;
Ok(())
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment