diff --git a/node/core/dispute-coordinator/src/metrics.rs b/node/core/dispute-coordinator/src/metrics.rs index dd4ef4d8c1d8..a683c1532943 100644 --- a/node/core/dispute-coordinator/src/metrics.rs +++ b/node/core/dispute-coordinator/src/metrics.rs @@ -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, /// Votes of all disputes. + #[cfg(feature = "disputes")] votes: prometheus::CounterVec, /// Conclusion across all disputes. + #[cfg(feature = "disputes")] concluded: prometheus::CounterVec, /// Number of participations that have been queued. + #[cfg(feature = "disputes")] queued_participations: prometheus::CounterVec, } @@ -78,6 +82,13 @@ impl Metrics { } impl metrics::Metrics for Metrics { + #[cfg(not(feature = "disputes"))] + fn try_register(_registry: &prometheus::Registry) -> Result { + let metrics = MetricsInner {}; + Ok(Metrics(Some(metrics))) + } + + #[cfg(feature = "disputes")] fn try_register(registry: &prometheus::Registry) -> Result { let metrics = MetricsInner { open: prometheus::register( diff --git a/node/malus/src/variants/suggest_garbage_candidate.rs b/node/malus/src/variants/suggest_garbage_candidate.rs index f4e6c0eae503..82198c0a86b7 100644 --- a/node/malus/src/variants/suggest_garbage_candidate.rs +++ b/node/malus/src/variants/suggest_garbage_candidate.rs @@ -60,7 +60,6 @@ struct ReplacePoVBytes where Sender: Send, { - keystore: SyncCryptoStorePtr, queue: metered::UnboundedMeteredSender<(Sender, Hash, CandidateReceipt)>, } @@ -112,7 +111,7 @@ impl OverseerGen for SuggestGarbageCandidate { let (sink, source) = metered::unbounded(); let keystore = args.keystore.clone() as SyncCryptoStorePtr; - let filter = ReplacePoVBytes { keystore: keystore.clone(), queue: sink }; + let filter = ReplacePoVBytes { queue: sink }; let keystore2 = keystore.clone(); let spawner2 = spawner.clone(); diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index f05897b426b0..2a08df9cf8a4 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -319,10 +319,12 @@ struct MonitorConfig { #[derive(Debug, Clone, StructOpt)] struct EmergencySolutionConfig { /// The block hash at which scraping happens. If none is provided, the latest head is used. + #[allow(dead_code)] #[structopt(long)] at: Option, /// The solver algorithm to use. + #[allow(dead_code)] #[structopt(subcommand)] solver: Solvers,