mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-16 15:25:41 +00:00
Complex headers+messages Millau<->Rialto relay (#878)
* complex headers+messages relay * post-merge fix * fix + test issue with on-demand not starting
This commit is contained in:
committed by
Bastian Köcher
parent
0d60f42b5e
commit
e2131724fb
@@ -78,6 +78,11 @@ impl<BlockNumber: Clone + Copy> TransactionProofsRelayStorage for InMemoryStorag
|
||||
}
|
||||
}
|
||||
|
||||
/// Return prefix that will be used by default to expose Prometheus metrics of the exchange loop.
|
||||
pub fn metrics_prefix<P: TransactionProofPipeline>() -> String {
|
||||
format!("{}_to_{}_Exchange", P::SOURCE_NAME, P::TARGET_NAME)
|
||||
}
|
||||
|
||||
/// Run proofs synchronization.
|
||||
pub async fn run<P: TransactionProofPipeline>(
|
||||
storage: impl TransactionProofsRelayStorage<BlockNumber = BlockNumberOf<P>>,
|
||||
@@ -89,12 +94,9 @@ pub async fn run<P: TransactionProofPipeline>(
|
||||
let exit_signal = exit_signal.shared();
|
||||
|
||||
relay_utils::relay_loop(source_client, target_client)
|
||||
.with_metrics(
|
||||
format!("{}_to_{}_Exchange", P::SOURCE_NAME, P::TARGET_NAME),
|
||||
metrics_params,
|
||||
)
|
||||
.loop_metric(ExchangeLoopMetrics::default())?
|
||||
.standalone_metric(GlobalMetrics::default())?
|
||||
.with_metrics(Some(metrics_prefix::<P>()), metrics_params)
|
||||
.loop_metric(|registry, prefix| ExchangeLoopMetrics::new(registry, prefix))?
|
||||
.standalone_metric(|registry, prefix| GlobalMetrics::new(registry, prefix))?
|
||||
.expose()
|
||||
.await?
|
||||
.run(|source_client, target_client, metrics| {
|
||||
|
||||
Reference in New Issue
Block a user