mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 10:37:56 +00:00
companion for try-runtime revamp (#1997)
* companion for try-rutnime revamp * Fixes Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -231,14 +231,20 @@ pub fn run() -> Result<()> {
|
||||
Some(Subcommand::TryRuntime(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
|
||||
use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
|
||||
type HostFunctionsOf<E> = ExtendedHostFunctions<
|
||||
sp_io::SubstrateHostFunctions,
|
||||
<E as NativeExecutionDispatch>::ExtendHostFunctions,
|
||||
>;
|
||||
|
||||
// grab the task manager.
|
||||
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
|
||||
let task_manager =
|
||||
sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry)
|
||||
.map_err(|e| format!("Error: {:?}", e))?;
|
||||
|
||||
runner.async_run(|config| {
|
||||
Ok((cmd.run::<Block, ParachainNativeExecutor>(config), task_manager))
|
||||
runner.async_run(|_| {
|
||||
Ok((cmd.run::<Block, HostFunctionsOf<ParachainNativeExecutor>>(), task_manager))
|
||||
})
|
||||
},
|
||||
#[cfg(not(feature = "try-runtime"))]
|
||||
|
||||
Reference in New Issue
Block a user