@@ -3,7 +3,7 @@ use cli_opt::SealingMode;
33pub use futures:: stream:: StreamExt ;
44use sc_consensus:: block_import:: BlockImport ;
55
6- use common_primitives:: node:: { Block , Hash } ;
6+ use common_primitives:: node:: { Block , BlockNumber , Hash } ;
77use core:: marker:: PhantomData ;
88use futures:: Stream ;
99use sc_client_api:: backend:: { Backend as ClientBackend , Finalizer } ;
@@ -12,14 +12,15 @@ use sc_consensus_manual_seal::{
1212} ;
1313
1414use futures:: FutureExt ;
15+ use sc_network:: NetworkBackend ;
1516use sc_service:: { Configuration , TaskManager } ;
1617use sc_transaction_pool_api:: { OffchainTransactionPoolFactory , TransactionPool } ;
1718use sp_api:: ProvideRuntimeApi ;
1819use sp_blockchain:: HeaderBackend ;
1920use sp_consensus:: { Environment , Proposer , SelectChain } ;
2021use sp_inherents:: CreateInherentDataProviders ;
2122use sp_runtime:: traits:: Block as BlockT ;
22- use std:: { task :: Poll , sync :: Arc } ;
23+ use std:: { sync :: Arc , task :: Poll } ;
2324
2425/// Function to start Frequency in dev mode without a relay chain
2526/// This function is called when --chain dev --sealing= is passed.
@@ -37,7 +38,11 @@ pub fn start_frequency_dev_sealing_node(
3738 } ;
3839 log:: info!( "📎 Development mode (no relay chain) with {} sealing{}" , sealing_mode, extra) ;
3940
40- let net_config = sc_network:: config:: FullNetworkConfiguration :: < _ , _ , sc_network:: NetworkWorker < Block , Hash > > :: new ( & config. network ) ;
41+ let net_config = sc_network:: config:: FullNetworkConfiguration :: <
42+ _ ,
43+ _ ,
44+ sc_network:: NetworkWorker < Block , Hash > ,
45+ > :: new ( & config. network ) ;
4146 let sc_service:: PartialComponents {
4247 client,
4348 backend,
@@ -48,6 +53,9 @@ pub fn start_frequency_dev_sealing_node(
4853 transaction_pool,
4954 other : ( _block_import, mut telemetry, _) ,
5055 } = new_partial ( & config, true ) ?;
56+ let metrics = sc_network:: NetworkWorker :: < Block , Hash > :: register_notification_metrics (
57+ config. prometheus_config . as_ref ( ) . map ( |cfg| & cfg. registry ) ,
58+ ) ;
5159
5260 // Build the network components required for the blockchain.
5361 let ( network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
@@ -61,6 +69,7 @@ pub fn start_frequency_dev_sealing_node(
6169 block_announce_validator_builder : None ,
6270 warp_sync_params : None ,
6371 block_relay : None ,
72+ metrics,
6473 } ) ?;
6574
6675 // Start off-chain workers if enabled
0 commit comments