From a086d74a0eaea11e7dc56184fce1bdc5e62af35e Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Thu, 7 Mar 2024 13:52:19 +0100
Subject: [PATCH] clean(#214): remove useless ExecutorTrait

---
 node/src/service.rs | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/node/src/service.rs b/node/src/service.rs
index 1ec13cc72..d9721f247 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 {
-- 
GitLab