@@ -21,6 +21,7 @@ use frame_benchmarking_cli::BenchmarkCmd;
2121use futures:: future:: TryFutureExt ;
2222use futures:: StreamExt ;
2323use sc_cli:: { ChainSpec , CliConfiguration , Database , DatabaseParams , SubstrateCli } ;
24+ use sc_executor:: NativeExecutionDispatch ;
2425use sc_service:: PartialComponents ;
2526use sc_subspace_chain_specs:: ExecutionChainSpec ;
2627use sp_core:: crypto:: Ss58AddressFormat ;
@@ -29,6 +30,24 @@ use subspace_node::{Cli, ExecutorDispatch, SecondaryChainCli, Subcommand};
2930use subspace_runtime:: { Block , RuntimeApi } ;
3031use subspace_service:: SubspaceConfiguration ;
3132
33+ /// Secondary executor instance.
34+ pub struct SecondaryExecutorDispatch ;
35+
36+ impl NativeExecutionDispatch for SecondaryExecutorDispatch {
37+ #[ cfg( feature = "runtime-benchmarks" ) ]
38+ type ExtendHostFunctions = frame_benchmarking:: benchmarking:: HostFunctions ;
39+ #[ cfg( not( feature = "runtime-benchmarks" ) ) ]
40+ type ExtendHostFunctions = ( ) ;
41+
42+ fn dispatch ( method : & str , data : & [ u8 ] ) -> Option < Vec < u8 > > {
43+ cirrus_runtime:: api:: dispatch ( method, data)
44+ }
45+
46+ fn native_version ( ) -> sc_executor:: NativeVersion {
47+ cirrus_runtime:: native_version ( )
48+ }
49+ }
50+
3251/// Subspace node error.
3352#[ derive( thiserror:: Error , Debug ) ]
3453pub enum Error {
@@ -385,7 +404,15 @@ fn main() -> Result<(), Error> {
385404 ) )
386405 } ) ?;
387406
388- let secondary_chain_node_fut = cirrus_node:: service:: new_full (
407+ let secondary_chain_node_fut = cirrus_node:: service:: new_full :: <
408+ _ ,
409+ _ ,
410+ _ ,
411+ _ ,
412+ _ ,
413+ cirrus_runtime:: RuntimeApi ,
414+ SecondaryExecutorDispatch ,
415+ > (
389416 secondary_chain_config,
390417 primary_chain_node. client . clone ( ) ,
391418 primary_chain_node. network . clone ( ) ,
0 commit comments