Skip to content

Commit

Permalink
Fix slot index position status (#4736)
Browse files Browse the repository at this point in the history
* Fix SlotIndexPosition from Future to Past in case slots_since returns an error

* Update ci.yml
  • Loading branch information
Leo-Besancon authored Aug 1, 2024
1 parent 425e5c8 commit 2cfad9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-nextest
args: cargo-nextest --locked
- uses: actions-rs/cargo@v1
with:
command: nextest
Expand Down
2 changes: 1 addition & 1 deletion massa-execution-worker/src/active_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl ActiveHistory {
return SlotIndexPosition::Past; // too old
}
let index: usize = match slot.slots_since(first_slot, thread_count) {
Err(_) => return SlotIndexPosition::Future, // overflow
Err(_) => return SlotIndexPosition::Past, // overflow
Ok(d) => {
match d.try_into() {
Ok(d) => d,
Expand Down

0 comments on commit 2cfad9e

Please sign in to comment.