git.delta.rocks / unique-network / refs/commits / 060d94005368

difftreelog

Fix NativeExecutionDispatches

Daniel Shiposha2022-03-14parent: #186cd5e.patch.diff
in: master

1 file changed

modifiednode/cli/src/service.rsdiffbeforeafterboth
69pub struct QuartzRuntimeExecutor;69pub struct QuartzRuntimeExecutor;
70pub struct OpalRuntimeExecutor;70pub struct OpalRuntimeExecutor;
7171
72#[cfg(feature = "unique-runtime")]
72impl NativeExecutionDispatch for UniqueRuntimeExecutor {73impl NativeExecutionDispatch for UniqueRuntimeExecutor {
73 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;74 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
7475
81 }82 }
82}83}
8384
85#[cfg(feature = "quartz-runtime")]
84impl NativeExecutionDispatch for QuartzRuntimeExecutor {86impl NativeExecutionDispatch for QuartzRuntimeExecutor {
85 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;87 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
8688
87 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {89 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
88 unique_runtime::api::dispatch(method, data)90 quartz_runtime::api::dispatch(method, data)
89 }91 }
9092
91 fn native_version() -> sc_executor::NativeVersion {93 fn native_version() -> sc_executor::NativeVersion {
92 unique_runtime::native_version()94 quartz_runtime::native_version()
93 }95 }
94}96}
9597
98#[cfg(feature = "opal-runtime")]
96impl NativeExecutionDispatch for OpalRuntimeExecutor {99impl NativeExecutionDispatch for OpalRuntimeExecutor {
97 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;100 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
98101
99 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {102 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
100 unique_runtime::api::dispatch(method, data)103 opal_runtime::api::dispatch(method, data)
101 }104 }
102105
103 fn native_version() -> sc_executor::NativeVersion {106 fn native_version() -> sc_executor::NativeVersion {
104 unique_runtime::native_version()107 opal_runtime::native_version()
105 }108 }
106}109}
107110