Skip to content

Commit

Permalink
state-sync: initialize checkpoint watermarks on start
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Jan 30, 2023
1 parent 754f7dd commit 910c3e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions crates/sui-network/src/state_sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,20 @@ where
subscriber
};

// Initialize checkpoint watermark metrics
self.metrics.set_highest_verified_checkpoint(
self.store
.get_highest_verified_checkpoint()
.expect("store operation should not fail")
.sequence_number(),
);
self.metrics.set_highest_synced_checkpoint(
self.store
.get_highest_synced_checkpoint()
.expect("store operation should not fail")
.sequence_number(),
);

loop {
tokio::select! {
now = interval.tick() => {
Expand Down

0 comments on commit 910c3e2

Please sign in to comment.