@@ -18,6 +18,8 @@ use cumulus_network::build_block_announce_validator;
1818use cumulus_service:: {
1919 prepare_node_config, start_collator, start_full_node, StartCollatorParams , StartFullNodeParams ,
2020} ;
21+ use frontier_consensus:: FrontierBlockImport ;
22+ use moonbeam_runtime:: { opaque:: Block , RuntimeApi } ;
2123use polkadot_primitives:: v0:: CollatorPair ;
2224use sc_executor:: native_executor_instance;
2325pub use sc_executor:: NativeExecutor ;
@@ -26,8 +28,6 @@ use sp_core::Pair;
2628use sp_runtime:: traits:: BlakeTwo256 ;
2729use sp_trie:: PrefixedMemoryDB ;
2830use std:: sync:: Arc ;
29- use frontier_consensus:: FrontierBlockImport ;
30- use moonbeam_runtime:: { RuntimeApi , opaque:: Block } ;
3131// Our native executor instance.
3232native_executor_instance ! (
3333 pub Executor ,
@@ -42,26 +42,17 @@ type FullBackend = TFullBackend<Block>;
4242///
4343/// Use this macro if you don't actually need the full service, but just the builder in order to
4444/// be able to perform chain operations.
45+ #[ allow( clippy:: type_complexity) ]
4546pub fn new_partial (
4647 config : & Configuration ,
4748) -> Result <
4849 PartialComponents <
4950 FullClient ,
5051 FullBackend ,
5152 ( ) ,
52- sp_consensus:: import_queue:: BasicQueue <
53- Block ,
54- PrefixedMemoryDB < BlakeTwo256 > ,
55- > ,
56- sc_transaction_pool:: FullPool <
57- Block ,
58- FullClient ,
59- > ,
60- FrontierBlockImport <
61- Block ,
62- Arc < FullClient > ,
63- FullClient ,
64- > ,
53+ sp_consensus:: import_queue:: BasicQueue < Block , PrefixedMemoryDB < BlakeTwo256 > > ,
54+ sc_transaction_pool:: FullPool < Block , FullClient > ,
55+ FrontierBlockImport < Block , Arc < FullClient > , FullClient > ,
6556 > ,
6657 sc_service:: Error ,
6758> {
@@ -80,18 +71,14 @@ pub fn new_partial(
8071 client. clone ( ) ,
8172 ) ;
8273
83- let frontier_block_import = FrontierBlockImport :: new (
84- client. clone ( ) ,
85- client. clone ( ) ,
86- true
87- ) ;
74+ let frontier_block_import = FrontierBlockImport :: new ( client. clone ( ) , client. clone ( ) , true ) ;
8875
8976 let import_queue = cumulus_consensus:: import_queue:: import_queue (
9077 client. clone ( ) ,
9178 frontier_block_import. clone ( ) ,
9279 inherent_data_providers. clone ( ) ,
9380 & task_manager. spawn_handle ( ) ,
94- registry. clone ( ) ,
81+ registry,
9582 ) ?;
9683
9784 let params = PartialComponents {
@@ -119,7 +106,7 @@ async fn start_node_impl<RB>(
119106 id : polkadot_primitives:: v0:: Id ,
120107 validator : bool ,
121108 _rpc_ext_builder : RB ,
122- ) -> sc_service:: error:: Result < ( TaskManager , Arc < FullClient > ) >
109+ ) -> sc_service:: error:: Result < ( TaskManager , Arc < FullClient > ) >
123110where
124111 RB : Fn (
125112 Arc < TFullClient < Block , RuntimeApi , Executor > > ,
@@ -163,13 +150,13 @@ where
163150 let block_import = params. other ;
164151 let ( network, network_status_sinks, system_rpc_tx, start_network) =
165152 sc_service:: build_network ( sc_service:: BuildNetworkParams {
166- config : & parachain_config,
167- client : client. clone ( ) ,
168- transaction_pool : transaction_pool. clone ( ) ,
169- spawn_handle : task_manager. spawn_handle ( ) ,
170- import_queue,
171- on_demand : None ,
172- block_announce_validator_builder : Some ( Box :: new ( |_| block_announce_validator) ) ,
153+ config : & parachain_config,
154+ client : client. clone ( ) ,
155+ transaction_pool : transaction_pool. clone ( ) ,
156+ spawn_handle : task_manager. spawn_handle ( ) ,
157+ import_queue,
158+ on_demand : None ,
159+ block_announce_validator_builder : Some ( Box :: new ( |_| block_announce_validator) ) ,
173160 } ) ?;
174161
175162 let is_authority = parachain_config. role . is_authority ( ) ;
@@ -191,17 +178,14 @@ where
191178 command_sink : None ,
192179 } ;
193180
194- moonbeam_rpc:: create_full (
195- deps,
196- subscription_task_executor. clone ( )
197- )
181+ moonbeam_rpc:: create_full ( deps, subscription_task_executor. clone ( ) )
198182 } )
199183 } ;
200184
201185 sc_service:: spawn_tasks ( sc_service:: SpawnTasksParams {
202186 on_demand : None ,
203187 remote_blockchain : None ,
204- rpc_extensions_builder : rpc_extensions_builder ,
188+ rpc_extensions_builder,
205189 client : client. clone ( ) ,
206190 transaction_pool : transaction_pool. clone ( ) ,
207191 task_manager : & mut task_manager,
@@ -232,7 +216,7 @@ where
232216
233217 let params = StartCollatorParams {
234218 para_id : id,
235- block_import : block_import ,
219+ block_import,
236220 proposer_factory,
237221 inherent_data_providers : params. inherent_data_providers ,
238222 block_status : client. clone ( ) ,
0 commit comments