companion for try-runtime revamp (#6187)

* update to reflect latest try-runtime stuff

* update to latest version

* fix

* fix miner

* update

* update

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-12-15 09:10:16 +00:00
committed by GitHub
parent 193c8de9db
commit a3c81fe2a9
7 changed files with 246 additions and 232 deletions
+11 -9
View File
@@ -638,9 +638,14 @@ pub fn run() -> Result<()> {
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
let runner = cli.create_runner(cmd)?;
let chain_spec = &runner.config().chain_spec;
set_default_ss58_version(chain_spec);
type HostFunctionsOf<E> = ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<E as NativeExecutionDispatch>::ExtendHostFunctions,
>;
use sc_service::TaskManager;
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
@@ -651,10 +656,9 @@ pub fn run() -> Result<()> {
#[cfg(feature = "kusama-native")]
if chain_spec.is_kusama() {
return runner.async_run(|config| {
return runner.async_run(|_| {
Ok((
cmd.run::<service::kusama_runtime::Block, service::KusamaExecutorDispatch>(
config,
cmd.run::<service::kusama_runtime::Block, HostFunctionsOf<service::KusamaExecutorDispatch>>(
)
.map_err(Error::SubstrateCli),
task_manager,
@@ -664,10 +668,9 @@ pub fn run() -> Result<()> {
#[cfg(feature = "westend-native")]
if chain_spec.is_westend() {
return runner.async_run(|config| {
return runner.async_run(|_| {
Ok((
cmd.run::<service::westend_runtime::Block, service::WestendExecutorDispatch>(
config,
cmd.run::<service::westend_runtime::Block, HostFunctionsOf<service::WestendExecutorDispatch>>(
)
.map_err(Error::SubstrateCli),
task_manager,
@@ -677,10 +680,9 @@ pub fn run() -> Result<()> {
// else we assume it is polkadot.
#[cfg(feature = "polkadot-native")]
{
return runner.async_run(|config| {
return runner.async_run(|_| {
Ok((
cmd.run::<service::polkadot_runtime::Block, service::PolkadotExecutorDispatch>(
config,
cmd.run::<service::polkadot_runtime::Block, HostFunctionsOf<service::PolkadotExecutorDispatch>>(
)
.map_err(Error::SubstrateCli),
task_manager,