diff --git a/client/cli/src/arg_enums.rs b/client/cli/src/arg_enums.rs index c3399a89680d1..7e2498cec4b7f 100644 --- a/client/cli/src/arg_enums.rs +++ b/client/cli/src/arg_enums.rs @@ -74,12 +74,12 @@ impl std::fmt::Display for WasmExecutionMethod { /// into an execution method which can be used internally. pub fn execution_method_from_cli( execution_method: WasmExecutionMethod, - _instantiation_strategy: WasmtimeInstantiationStrategy, + instantiation_strategy: WasmtimeInstantiationStrategy, ) -> sc_service::config::WasmExecutionMethod { match execution_method { WasmExecutionMethod::Interpreted => sc_service::config::WasmExecutionMethod::Interpreted, WasmExecutionMethod::Compiled => sc_service::config::WasmExecutionMethod::Compiled { - instantiation_strategy: match _instantiation_strategy { + instantiation_strategy: match instantiation_strategy { WasmtimeInstantiationStrategy::PoolingCopyOnWrite => sc_service::config::WasmtimeInstantiationStrategy::PoolingCopyOnWrite, WasmtimeInstantiationStrategy::RecreateInstanceCopyOnWrite => diff --git a/utils/frame/try-runtime/cli/src/lib.rs b/utils/frame/try-runtime/cli/src/lib.rs index 8eb7ab0209a0e..8caad60127d71 100644 --- a/utils/frame/try-runtime/cli/src/lib.rs +++ b/utils/frame/try-runtime/cli/src/lib.rs @@ -133,7 +133,6 @@ //! given the right flag: //! //! ```ignore -//! //! #[cfg(feature = "try-runtime")] //! fn pre_upgrade() -> Result, &'static str> {} //! @@ -365,8 +364,9 @@ use remote_externalities::{ TestExternalities, }; use sc_cli::{ - CliConfiguration, RuntimeVersion, WasmExecutionMethod, WasmtimeInstantiationStrategy, - DEFAULT_WASMTIME_INSTANTIATION_STRATEGY, DEFAULT_WASM_EXECUTION_METHOD, + execution_method_from_cli, CliConfiguration, RuntimeVersion, WasmExecutionMethod, + WasmtimeInstantiationStrategy, DEFAULT_WASMTIME_INSTANTIATION_STRATEGY, + DEFAULT_WASM_EXECUTION_METHOD, }; use sc_executor::{sp_wasm_interface::HostFunctions, WasmExecutor}; use sp_api::HashT; @@ -832,7 +832,7 @@ pub(crate) fn build_executor(shared: &SharedParams) -> WasmExe let runtime_cache_size = 2; WasmExecutor::new( - sc_executor::WasmExecutionMethod::Interpreted, + execution_method_from_cli(shared.wasm_method, shared.wasmtime_instantiation_strategy), heap_pages, max_runtime_instances, None,