From 60f2b6beaec5072e1d8311d84825b6786dd4ff39 Mon Sep 17 00:00:00 2001 From: "Denis K." Date: Mon, 2 Dec 2024 21:03:58 -0300 Subject: [PATCH] WIP: add network backend --- node/service/src/dev.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/node/service/src/dev.rs b/node/service/src/dev.rs index fd54fc4e..3cfdbde8 100644 --- a/node/service/src/dev.rs +++ b/node/service/src/dev.rs @@ -241,14 +241,14 @@ where } /// Creates new service from the configuration. -pub fn new_service( +pub fn new_service::Hash>>( config: Configuration, ) -> Result< ( TaskManager, Arc>, - Arc::Hash>>, - //Arc, + // Arc::Hash>>, + Arc, Arc>>, ), ServiceError, @@ -269,7 +269,7 @@ where other: (rpc_builder, block_import, grandpa_link, mut telemetry), } = new_partial(&config)?; - let mut net_config = sc_network::config::FullNetworkConfiguration::new( + let mut net_config = sc_network::config::FullNetworkConfiguration::<_, _, Network>::new( &config.network, config .prometheus_config @@ -285,12 +285,13 @@ where .expect("Genesis block exists; qed"), &config.chain_spec, ); - let metrics = NetworkBackend::register_notification_metrics( + // let metrics = NetworkBackend::register_notification_metrics( + let metrics = Network::register_notification_metrics( config.prometheus_config.as_ref().map(|cfg| &cfg.registry), ); let peer_store_handle = net_config.peer_store_handle(); let (grandpa_protocol_config, grandpa_notification_service) = - sc_consensus_grandpa::grandpa_peers_set_config( + sc_consensus_grandpa::grandpa_peers_set_config::<_, Network>( grandpa_protocol_name.clone(), metrics.clone(), Arc::clone(&peer_store_handle),