diff --git a/relays/messages/src/message_race_delivery.rs b/relays/messages/src/message_race_delivery.rs index 0d957fd8b7..c704a7b561 100644 --- a/relays/messages/src/message_race_delivery.rs +++ b/relays/messages/src/message_race_delivery.rs @@ -124,8 +124,8 @@ where self.client.latest_confirmed_received_nonce(at_block).await?; if let Some(metrics_msg) = self.metrics_msg.as_ref() { - metrics_msg.update_source_latest_generated_nonce::

(latest_generated_nonce); - metrics_msg.update_source_latest_confirmed_nonce::

(latest_confirmed_nonce); + metrics_msg.update_source_latest_generated_nonce(latest_generated_nonce); + metrics_msg.update_source_latest_confirmed_nonce(latest_confirmed_nonce); } let new_nonces = if latest_generated_nonce > prev_latest_nonce { @@ -195,8 +195,8 @@ where if update_metrics { if let Some(metrics_msg) = self.metrics_msg.as_ref() { - metrics_msg.update_target_latest_received_nonce::

(latest_received_nonce); - metrics_msg.update_target_latest_confirmed_nonce::

(latest_confirmed_nonce); + metrics_msg.update_target_latest_received_nonce(latest_received_nonce); + metrics_msg.update_target_latest_confirmed_nonce(latest_confirmed_nonce); } } diff --git a/relays/messages/src/message_race_receiving.rs b/relays/messages/src/message_race_receiving.rs index 70a3d7c247..e6497a1b79 100644 --- a/relays/messages/src/message_race_receiving.rs +++ b/relays/messages/src/message_race_receiving.rs @@ -112,7 +112,7 @@ where ) -> Result<(TargetHeaderIdOf

, SourceClientNonces), Self::Error> { let (at_block, latest_received_nonce) = self.client.latest_received_nonce(at_block).await?; if let Some(metrics_msg) = self.metrics_msg.as_ref() { - metrics_msg.update_target_latest_received_nonce::

(latest_received_nonce); + metrics_msg.update_target_latest_received_nonce(latest_received_nonce); } Ok(( at_block, @@ -174,7 +174,7 @@ where self.client.latest_confirmed_received_nonce(at_block).await?; if update_metrics { if let Some(metrics_msg) = self.metrics_msg.as_ref() { - metrics_msg.update_source_latest_confirmed_nonce::

(latest_confirmed_nonce); + metrics_msg.update_source_latest_confirmed_nonce(latest_confirmed_nonce); } } Ok((at_block, TargetClientNonces { latest_nonce: latest_confirmed_nonce, nonces_data: () })) diff --git a/relays/messages/src/metrics.rs b/relays/messages/src/metrics.rs index 20c6986b47..69d80d178d 100644 --- a/relays/messages/src/metrics.rs +++ b/relays/messages/src/metrics.rs @@ -101,7 +101,7 @@ impl MessageLaneLoopMetrics { } /// Update latest generated nonce at source. - pub fn update_source_latest_generated_nonce( + pub fn update_source_latest_generated_nonce( &self, source_latest_generated_nonce: MessageNonce, ) { @@ -111,7 +111,7 @@ impl MessageLaneLoopMetrics { } /// Update the latest confirmed nonce at source. - pub fn update_source_latest_confirmed_nonce( + pub fn update_source_latest_confirmed_nonce( &self, source_latest_confirmed_nonce: MessageNonce, ) { @@ -121,17 +121,14 @@ impl MessageLaneLoopMetrics { } /// Update the latest received nonce at target. - pub fn update_target_latest_received_nonce( - &self, - target_latest_generated_nonce: MessageNonce, - ) { + pub fn update_target_latest_received_nonce(&self, target_latest_generated_nonce: MessageNonce) { self.lane_state_nonces .with_label_values(&["target_latest_received"]) .set(target_latest_generated_nonce); } /// Update the latest confirmed nonce at target. - pub fn update_target_latest_confirmed_nonce( + pub fn update_target_latest_confirmed_nonce( &self, target_latest_confirmed_nonce: MessageNonce, ) {