Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Aug 23, 2024
1 parent e6a017a commit 7bc6edb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/instruction_handlers/heap_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl HeapFromState for AuxHeap {
/// The last address to which 32 can be added without overflow.
const LAST_ADDRESS: u32 = u32::MAX - 32;

// Necessary because the obvious code compiles to a comparison of two 256-bit numbers.
#[inline(always)]
fn bigger_than_last_address(x: U256) -> bool {
x.0[0] > LAST_ADDRESS.into() || x.0[1] != 0 || x.0[2] != 0 || x.0[3] != 0
Expand Down

0 comments on commit 7bc6edb

Please sign in to comment.