mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 13:15:41 +00:00
Prometheus: Use correct chain id (#10457)
* Prometheus: Use correct chain id * FMT
This commit is contained in:
@@ -365,7 +365,11 @@ impl CliConfiguration for RunCmd {
|
|||||||
Ok(self.shared_params.dev || self.force_authoring)
|
Ok(self.shared_params.dev || self.force_authoring)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
|
fn prometheus_config(
|
||||||
|
&self,
|
||||||
|
default_listen_port: u16,
|
||||||
|
chain_spec: &Box<dyn ChainSpec>,
|
||||||
|
) -> Result<Option<PrometheusConfig>> {
|
||||||
Ok(if self.no_prometheus {
|
Ok(if self.no_prometheus {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
@@ -377,7 +381,7 @@ impl CliConfiguration for RunCmd {
|
|||||||
interface.into(),
|
interface.into(),
|
||||||
self.prometheus_port.unwrap_or(default_listen_port),
|
self.prometheus_port.unwrap_or(default_listen_port),
|
||||||
),
|
),
|
||||||
self.shared_params.chain_id(self.shared_params.dev),
|
chain_spec.id().into(),
|
||||||
))
|
))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,7 +368,11 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
|||||||
/// Get the prometheus configuration (`None` if disabled)
|
/// Get the prometheus configuration (`None` if disabled)
|
||||||
///
|
///
|
||||||
/// By default this is `None`.
|
/// By default this is `None`.
|
||||||
fn prometheus_config(&self, _default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
|
fn prometheus_config(
|
||||||
|
&self,
|
||||||
|
_default_listen_port: u16,
|
||||||
|
_chain_spec: &Box<dyn ChainSpec>,
|
||||||
|
) -> Result<Option<PrometheusConfig>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,7 +531,8 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
|||||||
rpc_cors: self.rpc_cors(is_dev)?,
|
rpc_cors: self.rpc_cors(is_dev)?,
|
||||||
rpc_max_payload: self.rpc_max_payload()?,
|
rpc_max_payload: self.rpc_max_payload()?,
|
||||||
ws_max_out_buffer_capacity: self.ws_max_out_buffer_capacity()?,
|
ws_max_out_buffer_capacity: self.ws_max_out_buffer_capacity()?,
|
||||||
prometheus_config: self.prometheus_config(DCV::prometheus_listen_port())?,
|
prometheus_config: self
|
||||||
|
.prometheus_config(DCV::prometheus_listen_port(), &chain_spec)?,
|
||||||
telemetry_endpoints,
|
telemetry_endpoints,
|
||||||
default_heap_pages: self.default_heap_pages()?,
|
default_heap_pages: self.default_heap_pages()?,
|
||||||
offchain_worker: self.offchain_worker(&role)?,
|
offchain_worker: self.offchain_worker(&role)?,
|
||||||
|
|||||||
Reference in New Issue
Block a user