Skip to content

Commit

Permalink
[TRIVIAL] Autopilot: Add last seen block metrics to Maintenance::upda…
Browse files Browse the repository at this point in the history
…te (#3052)

# Description
Add last seen block metrics to Maintenance::update, since it was removed
in #3050
  • Loading branch information
m-lord-renkse authored Oct 11, 2024
1 parent 74eed7b commit 9619dd2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/autopilot/src/maintenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl Maintenance {
/// has a consistent state.
pub async fn update(&self, new_block: &BlockInfo) {
let mut last_block = self.last_processed.lock().await;
metrics().last_seen_block.set(new_block.number);
if last_block.number > new_block.number || last_block.hash == new_block.hash {
// `new_block` is neither newer than `last_block` nor a reorg
return;
Expand Down

0 comments on commit 9619dd2

Please sign in to comment.