Skip to content

Commit

Permalink
fix piltover logic for block 0
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Feb 20, 2025
1 parent 71d305d commit 0a0b6d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions saya/core/src/settlement/piltover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,12 @@ impl PiltoverSettlementBackend {
loop {
let last_settled_block = self.get_block_number().await.unwrap();

let mut next_to_settle = if last_settled_block == Felt::MAX {
let next_to_settle = if last_settled_block == Felt::MAX {
0
} else {
last_settled_block.try_into().unwrap()
(<Felt as TryInto<u64>>::try_into(last_settled_block).unwrap() + 1) as u64
};

next_to_settle += 1;
let da = pending_blocks.remove(&next_to_settle);

let Some(new_da) = da else {
Expand Down

0 comments on commit 0a0b6d6

Please sign in to comment.