Skip to content

Commit

Permalink
update slot check
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Coats committed Mar 5, 2024
1 parent 9ba5592 commit c5ef64e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bin/inx-chronicle/inx/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ pub enum InxWorkerError {
NetworkChanged { old: String, new: String },
#[error("node pruned required slots between `{start}` and `{end}`")]
SyncSlotGap { start: SlotIndex, end: SlotIndex },
#[error("node confirmed slot index `{node}` is less than index in database `{db}`")]
#[error("node accepted block slot index `{node}` is less than index in database `{db}`")]
SyncSlotIndexMismatch { node: SlotIndex, db: SlotIndex },
}
4 changes: 2 additions & 2 deletions src/bin/inx-chronicle/inx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ impl InxWorker {
start: latest_committed_slot.slot_index + 1,
end: pruning_slot,
});
} else if node_status.last_confirmed_block_slot < latest_committed_slot.slot_index {
} else if node_status.last_accepted_block_slot < latest_committed_slot.slot_index {
bail!(InxWorkerError::SyncSlotIndexMismatch {
node: node_status.last_confirmed_block_slot,
node: node_status.last_accepted_block_slot,
db: latest_committed_slot.slot_index,
});
} else {
Expand Down

0 comments on commit c5ef64e

Please sign in to comment.