mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 20:21:03 +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)]
|
#[derive(Clone)]
|
||||||
struct MetricsInner {
|
struct MetricsInner {
|
||||||
/// Number of opened disputes.
|
/// Number of opened disputes.
|
||||||
|
#[cfg(feature = "disputes")]
|
||||||
open: prometheus::Counter<prometheus::U64>,
|
open: prometheus::Counter<prometheus::U64>,
|
||||||
/// Votes of all disputes.
|
/// Votes of all disputes.
|
||||||
|
#[cfg(feature = "disputes")]
|
||||||
votes: prometheus::CounterVec<prometheus::U64>,
|
votes: prometheus::CounterVec<prometheus::U64>,
|
||||||
/// Conclusion across all disputes.
|
/// Conclusion across all disputes.
|
||||||
|
#[cfg(feature = "disputes")]
|
||||||
concluded: prometheus::CounterVec<prometheus::U64>,
|
concluded: prometheus::CounterVec<prometheus::U64>,
|
||||||
/// Number of participations that have been queued.
|
/// Number of participations that have been queued.
|
||||||
|
#[cfg(feature = "disputes")]
|
||||||
queued_participations: prometheus::CounterVec<prometheus::U64>,
|
queued_participations: prometheus::CounterVec<prometheus::U64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +82,13 @@ impl Metrics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl metrics::Metrics for 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> {
|
fn try_register(registry: &prometheus::Registry) -> Result<Self, prometheus::PrometheusError> {
|
||||||
let metrics = MetricsInner {
|
let metrics = MetricsInner {
|
||||||
open: prometheus::register(
|
open: prometheus::register(
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ struct ReplacePoVBytes<Sender>
|
|||||||
where
|
where
|
||||||
Sender: Send,
|
Sender: Send,
|
||||||
{
|
{
|
||||||
keystore: SyncCryptoStorePtr,
|
|
||||||
queue: metered::UnboundedMeteredSender<(Sender, Hash, CandidateReceipt)>,
|
queue: metered::UnboundedMeteredSender<(Sender, Hash, CandidateReceipt)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +111,7 @@ impl OverseerGen for SuggestGarbageCandidate {
|
|||||||
let (sink, source) = metered::unbounded();
|
let (sink, source) = metered::unbounded();
|
||||||
let keystore = args.keystore.clone() as SyncCryptoStorePtr;
|
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 keystore2 = keystore.clone();
|
||||||
let spawner2 = spawner.clone();
|
let spawner2 = spawner.clone();
|
||||||
|
|||||||
@@ -319,10 +319,12 @@ struct MonitorConfig {
|
|||||||
#[derive(Debug, Clone, StructOpt)]
|
#[derive(Debug, Clone, StructOpt)]
|
||||||
struct EmergencySolutionConfig {
|
struct EmergencySolutionConfig {
|
||||||
/// The block hash at which scraping happens. If none is provided, the latest head is used.
|
/// The block hash at which scraping happens. If none is provided, the latest head is used.
|
||||||
|
#[allow(dead_code)]
|
||||||
#[structopt(long)]
|
#[structopt(long)]
|
||||||
at: Option<Hash>,
|
at: Option<Hash>,
|
||||||
|
|
||||||
/// The solver algorithm to use.
|
/// The solver algorithm to use.
|
||||||
|
#[allow(dead_code)]
|
||||||
#[structopt(subcommand)]
|
#[structopt(subcommand)]
|
||||||
solver: Solvers,
|
solver: Solvers,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user