@@ -84,9 +84,7 @@ use std::{collections::HashMap, path::PathBuf, sync::Arc, time::Duration};
8484use prometheus_endpoint:: Registry ;
8585#[ cfg( feature = "full-node" ) ]
8686use sc_service:: KeystoreContainer ;
87- use sc_service:: {
88- build_default_syncing_engine, DefaultSyncingEngineConfig , RpcHandlers , SpawnTaskHandle ,
89- } ;
87+ use sc_service:: { RpcHandlers , SpawnTaskHandle } ;
9088use sc_telemetry:: TelemetryWorker ;
9189#[ cfg( feature = "full-node" ) ]
9290use sc_telemetry:: { Telemetry , TelemetryWorkerHandle } ;
@@ -100,7 +98,6 @@ pub use sc_client_api::{Backend, CallExecutor};
10098pub use sc_consensus:: { BlockImport , LongestChain } ;
10199pub use sc_executor:: NativeExecutionDispatch ;
102100use sc_executor:: { HeapAllocStrategy , WasmExecutor , DEFAULT_HEAP_ALLOC_STRATEGY } ;
103- use sc_network_sync:: service:: network:: NetworkServiceProvider ;
104101pub use sc_service:: {
105102 config:: { DatabaseSource , PrometheusConfig } ,
106103 ChainSpec , Configuration , Error as SubstrateServiceError , PruningMode , Role , TFullBackend ,
@@ -120,8 +117,6 @@ pub use {rococo_runtime, rococo_runtime_constants};
120117pub use { westend_runtime, westend_runtime_constants} ;
121118
122119pub use fake_runtime_api:: { GetLastTimestamp , RuntimeApi } ;
123- use sc_consensus:: ImportQueue ;
124- use sp_consensus:: block_validation:: DefaultBlockAnnounceValidator ;
125120
126121#[ cfg( feature = "full-node" ) ]
127122pub type FullBackend = sc_service:: TFullBackend < Block > ;
@@ -1033,25 +1028,6 @@ pub fn new_full<
10331028 } )
10341029 } ;
10351030
1036- let network_service_provider = NetworkServiceProvider :: new ( ) ;
1037- let ( sync_service, block_announce_config) =
1038- build_default_syncing_engine ( DefaultSyncingEngineConfig {
1039- role : config. role ,
1040- protocol_id : config. protocol_id ( ) ,
1041- fork_id : None ,
1042- net_config : & mut net_config,
1043- block_announce_validator : Box :: new ( DefaultBlockAnnounceValidator ) ,
1044- network_service_handle : network_service_provider. handle ( ) ,
1045- warp_sync_config : Some ( WarpSyncConfig :: WithProvider ( warp_sync) ) ,
1046- client : client. clone ( ) ,
1047- import_queue_service : import_queue. service ( ) ,
1048- num_peers_hint : config. network . default_peers_set . in_peers as usize +
1049- config. network . default_peers_set . out_peers as usize ,
1050- spawn_handle : & task_manager. spawn_handle ( ) ,
1051- metrics_registry : config. prometheus_config . as_ref ( ) . map ( |config| & config. registry ) ,
1052- metrics : metrics. clone ( ) ,
1053- } ) ?;
1054-
10551031 let ( network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
10561032 sc_service:: build_network ( sc_service:: BuildNetworkParams {
10571033 config : & config,
@@ -1060,9 +1036,9 @@ pub fn new_full<
10601036 transaction_pool : transaction_pool. clone ( ) ,
10611037 spawn_handle : task_manager. spawn_handle ( ) ,
10621038 import_queue,
1063- sync_service ,
1064- block_announce_config ,
1065- network_service_provider ,
1039+ block_announce_validator_builder : None ,
1040+ warp_sync_config : Some ( WarpSyncConfig :: WithProvider ( warp_sync ) ) ,
1041+ block_relay : None ,
10661042 metrics,
10671043 } ) ?;
10681044
0 commit comments