Skip to content

Commit

Permalink
fix(stages): update entities metrics on SyncHeight event (paradigmx…
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Jul 15, 2023
1 parent 6934428 commit 90b6d00
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/stages/src/metrics/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ impl MetricsListener {
match event {
MetricEvent::SyncHeight { height } => {
for stage_id in StageId::ALL {
let stage_metrics = self.sync_metrics.get_stage_metrics(stage_id);
stage_metrics.checkpoint.set(height as f64);
self.handle_event(MetricEvent::StageCheckpoint {
stage_id,
checkpoint: StageCheckpoint {
block_number: height,
stage_checkpoint: None,
},
max_block_number: Some(height),
});
}
}
MetricEvent::StageCheckpoint { stage_id, checkpoint, max_block_number } => {
Expand Down

0 comments on commit 90b6d00

Please sign in to comment.