mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
node: fix shutdown (#1308)
* node: remove grandpa authority flags * node: exit-guard grandpa and aura spawned futures * node: wait for futures to stop running on shutdown * core: run connectivity tests on same ports * core: pass on_exit future when starting aura and grandpa * node: add issue number to todo * core: fix aura and grandpa tests
This commit is contained in:
committed by
Robert Habermeier
parent
ef8b94656e
commit
f8f932d123
@@ -107,7 +107,7 @@ pub struct Service<Components: components::Components> {
|
||||
/// Configuration of this Service
|
||||
pub config: FactoryFullConfiguration<Components::Factory>,
|
||||
_rpc: Box<::std::any::Any + Send + Sync>,
|
||||
_telemetry: Option<tel::Telemetry>,
|
||||
_telemetry: Option<Arc<tel::Telemetry>>,
|
||||
}
|
||||
|
||||
/// Creates bare client without any networking.
|
||||
@@ -263,7 +263,7 @@ impl<Components: components::Components> Service<Components> {
|
||||
let impl_name = config.impl_name.to_owned();
|
||||
let version = version.clone();
|
||||
let chain_name = config.chain_spec.name().to_owned();
|
||||
Some(tel::init_telemetry(tel::TelemetryConfig {
|
||||
Some(Arc::new(tel::init_telemetry(tel::TelemetryConfig {
|
||||
url: url,
|
||||
on_connect: Box::new(move || {
|
||||
telemetry!("system.connected";
|
||||
@@ -276,7 +276,7 @@ impl<Components: components::Components> Service<Components> {
|
||||
"authority" => is_authority
|
||||
);
|
||||
}),
|
||||
}))
|
||||
})))
|
||||
},
|
||||
None => None,
|
||||
};
|
||||
@@ -306,6 +306,10 @@ impl<Components: components::Components> Service<Components> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn telemetry(&self) -> Option<Arc<tel::Telemetry>> {
|
||||
self._telemetry.as_ref().map(|t| t.clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl<Components> Service<Components> where Components: components::Components {
|
||||
|
||||
Reference in New Issue
Block a user