@@ -299,7 +299,6 @@ where
299
299
telemetry_worker_handle,
300
300
) ,
301
301
} = new_partial :: < RuntimeApi , Executor > ( & parachain_config, eth_rpc_config) ?;
302
-
303
302
let ( relay_chain_interface, collator_key) =
304
303
cumulus_client_service:: build_relay_chain_interface (
305
304
polkadot_config,
@@ -311,12 +310,10 @@ where
311
310
)
312
311
. await
313
312
. map_err ( |e| sc_service:: Error :: Application ( Box :: new ( e) as Box < _ > ) ) ?;
314
-
315
313
let validator = parachain_config. role . is_authority ( ) ;
316
314
let prometheus_registry = parachain_config. prometheus_registry ( ) . cloned ( ) ;
317
315
let import_queue_service = import_queue. service ( ) ;
318
316
let net_config = sc_network:: config:: FullNetworkConfiguration :: new ( & parachain_config. network ) ;
319
-
320
317
let ( network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
321
318
cumulus_client_service:: build_network ( cumulus_client_service:: BuildNetworkParams {
322
319
parachain_config : & parachain_config,
@@ -701,10 +698,10 @@ pub fn start_dev_node<RuntimeApi, Executor>(
701
698
eth_rpc_config : & crate :: cli:: EthRpcConfig ,
702
699
) -> Result < sc_service:: TaskManager , sc_service:: error:: Error >
703
700
where
704
- RuntimeApi : sp_api :: ConstructRuntimeApi < Block , FullClient < RuntimeApi , Executor > >
701
+ RuntimeApi : ' static
705
702
+ Send
706
703
+ Sync
707
- + ' static ,
704
+ + sp_api :: ConstructRuntimeApi < Block , FullClient < RuntimeApi , Executor > > ,
708
705
RuntimeApi :: RuntimeApi : RuntimeApiCollection ,
709
706
RuntimeApi :: RuntimeApi :
710
707
sp_consensus_aura:: AuraApi < Block , sp_consensus_aura:: sr25519:: AuthorityId > ,
@@ -733,7 +730,6 @@ where
733
730
) ,
734
731
} = new_partial :: < RuntimeApi , Executor > ( & config, eth_rpc_config) ?;
735
732
let net_config = sc_network:: config:: FullNetworkConfiguration :: new ( & config. network ) ;
736
-
737
733
let ( network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
738
734
sc_service:: build_network ( sc_service:: BuildNetworkParams {
739
735
config : & config,
@@ -770,17 +766,17 @@ where
770
766
}
771
767
772
768
let force_authoring = config. force_authoring ;
773
- let backoff_authoring_blocks: Option < ( ) > = None ;
769
+ let backoff_authoring_blocks = <Option < ( ) > >:: None ;
770
+ let slot_duration = sc_consensus_aura:: slot_duration ( & * client) ?;
774
771
let proposer_factory = sc_basic_authorship:: ProposerFactory :: new (
775
772
task_manager. spawn_handle ( ) ,
776
773
client. clone ( ) ,
777
774
transaction_pool. clone ( ) ,
778
775
None ,
779
776
None ,
780
777
) ;
781
-
782
- let slot_duration = sc_consensus_aura:: slot_duration ( & * client) ?;
783
778
let client_for_cidp = client. clone ( ) ;
779
+
784
780
if config. role . is_authority ( ) {
785
781
let aura = sc_consensus_aura:: start_aura :: <
786
782
sp_consensus_aura:: sr25519:: AuthorityPair ,
@@ -795,7 +791,7 @@ where
795
791
_ ,
796
792
_ ,
797
793
> ( sc_consensus_aura:: StartAuraParams {
798
- slot_duration : sc_consensus_aura :: slot_duration ( & * client ) ? ,
794
+ slot_duration,
799
795
client : client. clone ( ) ,
800
796
select_chain,
801
797
block_import : instant_finalize:: InstantFinalizeBlockImport :: new ( client. clone ( ) ) ,
@@ -900,8 +896,6 @@ where
900
896
let collator = config. role . is_authority ( ) ;
901
897
let eth_rpc_config = eth_rpc_config. clone ( ) ;
902
898
let sync_service = sync_service. clone ( ) ;
903
-
904
- let slot_duration = sc_consensus_aura:: slot_duration ( & * client) ?;
905
899
let pending_create_inherent_data_providers = move |_, ( ) | async move {
906
900
let current = sp_timestamp:: InherentDataProvider :: from_system_time ( ) ;
907
901
let next_slot = current. timestamp ( ) . as_millis ( ) + slot_duration. as_millis ( ) ;
0 commit comments