Skip to content

Commit

Permalink
Fix monitor (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmantica11 authored Nov 1, 2024
1 parent c8a8c04 commit 977e4da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/monitor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ pub fn continously_monitor_photon(
loop {
let latest_slot = LATEST_SLOT.load(Ordering::SeqCst);
let last_indexed_slot = fetch_last_indexed_slot_with_infinite_retry(db.as_ref()).await;
let lag = if last_indexed_slot > latest_slot {
last_indexed_slot - latest_slot
let lag = if latest_slot > last_indexed_slot {
latest_slot - last_indexed_slot
} else {
0
};
Expand Down

0 comments on commit 977e4da

Please sign in to comment.