mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
substrate-node: NativeElseWasmExecutor is no longer used (#2521)
This PR removes `NativeElseWasmExecutor` usage from substrate node. Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions, sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26) is used. Related to #2358. --------- Co-authored-by: Davide Galassi <davxy@datawok.net>
This commit is contained in:
committed by
GitHub
parent
1d5d4a4840
commit
39d6c95c0d
@@ -23,18 +23,20 @@ use crate::{
|
||||
Inspector,
|
||||
};
|
||||
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
|
||||
use sc_service::{Configuration, NativeExecutionDispatch};
|
||||
use sc_service::Configuration;
|
||||
use sp_runtime::traits::Block;
|
||||
|
||||
type HostFunctions =
|
||||
(sp_io::SubstrateHostFunctions, sp_statement_store::runtime_api::HostFunctions);
|
||||
|
||||
impl InspectCmd {
|
||||
/// Run the inspect command, passing the inspector.
|
||||
pub fn run<B, RA, D>(&self, config: Configuration) -> Result<()>
|
||||
pub fn run<B, RA>(&self, config: Configuration) -> Result<()>
|
||||
where
|
||||
B: Block,
|
||||
RA: Send + Sync + 'static,
|
||||
D: NativeExecutionDispatch + 'static,
|
||||
{
|
||||
let executor = sc_service::new_native_or_wasm_executor::<D>(&config);
|
||||
let executor = sc_service::new_wasm_executor::<HostFunctions>(&config);
|
||||
let client = sc_service::new_full_client::<B, RA, _>(&config, None, executor)?;
|
||||
let inspect = Inspector::<B>::new(client);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user