mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 02:21:04 +00:00
Fix proposer factory prometheus registration (#1862)
The proposer wasn't registered in prometheus and thus, we could not see its metrics.
This commit is contained in:
Generated
+1
@@ -4980,6 +4980,7 @@ dependencies = [
|
|||||||
"sp-inherents",
|
"sp-inherents",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
"sp-transaction-pool",
|
"sp-transaction-pool",
|
||||||
|
"substrate-prometheus-endpoint",
|
||||||
"wasm-timer",
|
"wasm-timer",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -20,4 +20,5 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|||||||
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
wasm-timer = "0.2.4"
|
wasm-timer = "0.2.4"
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ use sp_consensus::{Proposal, RecordProof};
|
|||||||
use sp_inherents::InherentData;
|
use sp_inherents::InherentData;
|
||||||
use sp_runtime::traits::{DigestFor, HashFor};
|
use sp_runtime::traits::{DigestFor, HashFor};
|
||||||
use sp_transaction_pool::TransactionPool;
|
use sp_transaction_pool::TransactionPool;
|
||||||
|
use prometheus_endpoint::Registry as PrometheusRegistry;
|
||||||
use std::{fmt, pin::Pin, sync::Arc, time};
|
use std::{fmt, pin::Pin, sync::Arc, time};
|
||||||
|
|
||||||
/// How long proposal can take before we give up and err out
|
/// How long proposal can take before we give up and err out
|
||||||
@@ -50,13 +51,14 @@ impl<TxPool, Backend, Client> ProposerFactory<TxPool, Backend, Client> {
|
|||||||
client: Arc<Client>,
|
client: Arc<Client>,
|
||||||
transaction_pool: Arc<TxPool>,
|
transaction_pool: Arc<TxPool>,
|
||||||
overseer: OverseerHandler,
|
overseer: OverseerHandler,
|
||||||
|
prometheus: Option<&PrometheusRegistry>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
ProposerFactory {
|
ProposerFactory {
|
||||||
inner: sc_basic_authorship::ProposerFactory::new(
|
inner: sc_basic_authorship::ProposerFactory::new(
|
||||||
spawn_handle,
|
spawn_handle,
|
||||||
client,
|
client,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
None,
|
prometheus,
|
||||||
),
|
),
|
||||||
overseer,
|
overseer,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -460,6 +460,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
|||||||
client.clone(),
|
client.clone(),
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
overseer_handler.clone(),
|
overseer_handler.clone(),
|
||||||
|
prometheus_registry.as_ref(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let babe_config = babe::BabeParams {
|
let babe_config = babe::BabeParams {
|
||||||
|
|||||||
Reference in New Issue
Block a user