|
18 | 18 |
|
19 | 19 | use futures::future::TryFutureExt; |
20 | 20 | use sc_cli::{ChainSpec, SubstrateCli}; |
21 | | -use sc_executor::NativeExecutionDispatch; |
22 | 21 | use sp_core::crypto::Ss58AddressFormat; |
23 | | -use subspace_node::{Cli, Subcommand}; |
| 22 | +use subspace_node::{Cli, ExecutorDispatch, Subcommand}; |
24 | 23 | use subspace_runtime::RuntimeApi; |
25 | 24 |
|
26 | 25 | /// Subspace node error. |
@@ -49,25 +48,6 @@ impl From<String> for Error { |
49 | 48 | } |
50 | 49 | } |
51 | 50 |
|
52 | | -struct ExecutorDispatch; |
53 | | - |
54 | | -impl NativeExecutionDispatch for ExecutorDispatch { |
55 | | - /// Only enable the benchmarking host functions when we actually want to benchmark. |
56 | | - #[cfg(feature = "runtime-benchmarks")] |
57 | | - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; |
58 | | - /// Otherwise we only use the default Substrate host functions. |
59 | | - #[cfg(not(feature = "runtime-benchmarks"))] |
60 | | - type ExtendHostFunctions = (); |
61 | | - |
62 | | - fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { |
63 | | - subspace_runtime::api::dispatch(method, data) |
64 | | - } |
65 | | - |
66 | | - fn native_version() -> sc_executor::NativeVersion { |
67 | | - subspace_runtime::native_version() |
68 | | - } |
69 | | -} |
70 | | - |
71 | 51 | fn set_default_ss58_version<C: AsRef<dyn ChainSpec>>(chain_spec: C) { |
72 | 52 | let maybe_ss58_address_format = chain_spec |
73 | 53 | .as_ref() |
|
0 commit comments