diff --git a/node/src/service.rs b/node/src/service.rs index 1ec13cc729ef9a9f356a7fa5e7ff2a86c289e54e..d9721f2479eca65ed2009ff51388ee2513381efd 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -46,7 +46,7 @@ type HostFunctions = ( #[cfg(feature = "native")] type FullClient<RuntimeApi, Executor> = sc_service::TFullClient<Block, RuntimeApi, sc_executor::NativeElseWasmExecutor<Executor>>; -// By default: WASM only Runtime +// By default, WASM only Runtime #[cfg(not(feature = "native"))] type FullClient<RuntimeApi, Executor> = sc_service::TFullClient<Block, RuntimeApi, sc_executor::WasmExecutor<Executor>>; @@ -54,15 +54,9 @@ type FullClient<RuntimeApi, Executor> = type FullBackend = sc_service::TFullBackend<Block>; type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>; -#[allow(dead_code)] -#[cfg(feature = "native")] -pub trait ExecutorTrait: sc_executor::NativeExecutionDispatch {} -#[cfg(not(feature = "native"))] -pub trait ExecutorTrait {} - #[cfg(feature = "gdev")] pub mod gdev_executor { - use crate::service::{ExecutorTrait, HostFunctions}; + use crate::service::HostFunctions; pub use gdev_runtime; use sc_executor::sp_wasm_interface::{Function, HostFunctionRegistry}; @@ -78,7 +72,6 @@ pub mod gdev_executor { gdev_runtime::native_version() } } - impl ExecutorTrait for GDevExecutor {} impl sc_executor::sp_wasm_interface::HostFunctions for GDevExecutor { fn host_functions() -> Vec<&'static dyn Function> { HostFunctions::host_functions() @@ -281,7 +274,7 @@ where + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorTrait + 'static, + Executor: sc_executor::NativeExecutionDispatch + 'static, Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static, { let telemetry = config @@ -410,7 +403,7 @@ where + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorTrait + 'static, + Executor: sc_executor::NativeExecutionDispatch + 'static, Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static, { let sc_service::PartialComponents {