File tree Expand file tree Collapse file tree
rust/main/agents/validator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -503,6 +503,14 @@ impl ValidatorSubmitterMetrics {
503503 }
504504
505505 fn set_latest_checkpoint_observed ( & self , checkpoint : & CheckpointAtBlock ) {
506+ let prev_checkpoint_index = self . latest_checkpoint_observed . get ( ) ;
507+
508+ if prev_checkpoint_index > checkpoint. index as i64 {
509+ tracing:: warn!(
510+ ?checkpoint,
511+ prev_checkpoint_index,
512+ checkpoint_index=checkpoint. index, "Observed a checkpoint with index that is lower than previous checkpoint. Did a reorg occur?" ) ;
513+ }
506514 self . latest_checkpoint_observed . set ( checkpoint. index as i64 ) ;
507515
508516 if let Some ( block_height) = checkpoint. block_height {
@@ -512,7 +520,7 @@ impl ValidatorSubmitterMetrics {
512520 tracing:: warn!(
513521 ?checkpoint,
514522 prev_block_height,
515- block_height, "Observed a checkpoint with block height that is lower previous checkpoint. Did a reorg occur?" ) ;
523+ block_height, "Observed a checkpoint with block height that is lower than previous checkpoint. Did a reorg occur?" ) ;
516524 }
517525 self . latest_checkpoint_observed_block_height
518526 . set ( block_height) ;
You can’t perform that action at this time.
0 commit comments