Skip to content
Snippets Groups Projects
Commit a086d74a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

clean(#214): remove useless ExecutorTrait

parent a4538ef0
No related branches found
No related tags found
1 merge request!255Resolve "Allow native Runtime execution"
...@@ -46,7 +46,7 @@ type HostFunctions = ( ...@@ -46,7 +46,7 @@ type HostFunctions = (
#[cfg(feature = "native")] #[cfg(feature = "native")]
type FullClient<RuntimeApi, Executor> = type FullClient<RuntimeApi, Executor> =
sc_service::TFullClient<Block, RuntimeApi, sc_executor::NativeElseWasmExecutor<Executor>>; sc_service::TFullClient<Block, RuntimeApi, sc_executor::NativeElseWasmExecutor<Executor>>;
// By default: WASM only Runtime // By default, WASM only Runtime
#[cfg(not(feature = "native"))] #[cfg(not(feature = "native"))]
type FullClient<RuntimeApi, Executor> = type FullClient<RuntimeApi, Executor> =
sc_service::TFullClient<Block, RuntimeApi, sc_executor::WasmExecutor<Executor>>; sc_service::TFullClient<Block, RuntimeApi, sc_executor::WasmExecutor<Executor>>;
...@@ -54,15 +54,9 @@ type FullClient<RuntimeApi, Executor> = ...@@ -54,15 +54,9 @@ type FullClient<RuntimeApi, Executor> =
type FullBackend = sc_service::TFullBackend<Block>; type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, 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")] #[cfg(feature = "gdev")]
pub mod gdev_executor { pub mod gdev_executor {
use crate::service::{ExecutorTrait, HostFunctions}; use crate::service::HostFunctions;
pub use gdev_runtime; pub use gdev_runtime;
use sc_executor::sp_wasm_interface::{Function, HostFunctionRegistry}; use sc_executor::sp_wasm_interface::{Function, HostFunctionRegistry};
...@@ -78,7 +72,6 @@ pub mod gdev_executor { ...@@ -78,7 +72,6 @@ pub mod gdev_executor {
gdev_runtime::native_version() gdev_runtime::native_version()
} }
} }
impl ExecutorTrait for GDevExecutor {}
impl sc_executor::sp_wasm_interface::HostFunctions for GDevExecutor { impl sc_executor::sp_wasm_interface::HostFunctions for GDevExecutor {
fn host_functions() -> Vec<&'static dyn Function> { fn host_functions() -> Vec<&'static dyn Function> {
HostFunctions::host_functions() HostFunctions::host_functions()
...@@ -281,7 +274,7 @@ where ...@@ -281,7 +274,7 @@ where
+ Sync + Sync
+ 'static, + 'static,
RuntimeApi::RuntimeApi: RuntimeApiCollection, RuntimeApi::RuntimeApi: RuntimeApiCollection,
Executor: ExecutorTrait + 'static, Executor: sc_executor::NativeExecutionDispatch + 'static,
Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static, Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static,
{ {
let telemetry = config let telemetry = config
...@@ -410,7 +403,7 @@ where ...@@ -410,7 +403,7 @@ where
+ Sync + Sync
+ 'static, + 'static,
RuntimeApi::RuntimeApi: RuntimeApiCollection, RuntimeApi::RuntimeApi: RuntimeApiCollection,
Executor: ExecutorTrait + 'static, Executor: sc_executor::NativeExecutionDispatch + 'static,
Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static, Executor: sc_executor::sp_wasm_interface::HostFunctions + 'static,
{ {
let sc_service::PartialComponents { let sc_service::PartialComponents {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment