mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
fix compile with new compiler - dead code (#4530)
* make compiler happy * node side compile warning quiet * ffs * malus: remove unused keystore
This commit is contained in:
committed by
GitHub
parent
edab23936c
commit
1d7efef4cd
@@ -19,12 +19,16 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus};
|
||||
#[derive(Clone)]
|
||||
struct MetricsInner {
|
||||
/// Number of opened disputes.
|
||||
#[cfg(feature = "disputes")]
|
||||
open: prometheus::Counter<prometheus::U64>,
|
||||
/// Votes of all disputes.
|
||||
#[cfg(feature = "disputes")]
|
||||
votes: prometheus::CounterVec<prometheus::U64>,
|
||||
/// Conclusion across all disputes.
|
||||
#[cfg(feature = "disputes")]
|
||||
concluded: prometheus::CounterVec<prometheus::U64>,
|
||||
/// Number of participations that have been queued.
|
||||
#[cfg(feature = "disputes")]
|
||||
queued_participations: prometheus::CounterVec<prometheus::U64>,
|
||||
}
|
||||
|
||||
@@ -78,6 +82,13 @@ impl Metrics {
|
||||
}
|
||||
|
||||
impl metrics::Metrics for Metrics {
|
||||
#[cfg(not(feature = "disputes"))]
|
||||
fn try_register(_registry: &prometheus::Registry) -> Result<Self, prometheus::PrometheusError> {
|
||||
let metrics = MetricsInner {};
|
||||
Ok(Metrics(Some(metrics)))
|
||||
}
|
||||
|
||||
#[cfg(feature = "disputes")]
|
||||
fn try_register(registry: &prometheus::Registry) -> Result<Self, prometheus::PrometheusError> {
|
||||
let metrics = MetricsInner {
|
||||
open: prometheus::register(
|
||||
|
||||
Reference in New Issue
Block a user