Skip to content

Commit

Permalink
Fix underflow in process_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Jul 19, 2024
1 parent d22cb1c commit caf9834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/headers_store.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod HeadersStore {

let reference_block = reference_block.unwrap();
start_block = reference_block - 1;
end_block = start_block - headers_rlp.len().into() + 1;
end_block = (start_block + 1) - headers_rlp.len().into();

let initial_blockhash = self.received_blocks.read(reference_block);
assert(initial_blockhash != Zeroable::zero(), 'BLOCK_NOT_RECEIVED');
Expand Down

0 comments on commit caf9834

Please sign in to comment.