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 = (
#[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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment