Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
a086d74a
Commit
a086d74a
authored
1 year ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
clean(
#214
): remove useless ExecutorTrait
parent
a4538ef0
No related branches found
No related tags found
1 merge request
!255
Resolve "Allow native Runtime execution"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
node/src/service.rs
+4
-11
4 additions, 11 deletions
node/src/service.rs
with
4 additions
and
11 deletions
node/src/service.rs
+
4
−
11
View file @
a086d74a
...
@@ -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
:
E
xecutor
Trait
+
'static
,
Executor
:
sc_e
xecutor
::
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
:
E
xecutor
Trait
+
'static
,
Executor
:
sc_e
xecutor
::
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
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment