Skip to content

Commit

Permalink
Non inclusion hotfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
feltroidprime committed Sep 3, 2024
1 parent f632dea commit 61b10f7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/mpt.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,9 @@ func decode_node_list_lazy{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(
);
assert should_be_empty_prefix = 0x80;
return (
n_nibbles_already_checked + key_be_nibbles + key_be_leading_zeroes_nibbles,
rlp,
-1,
);
// Returns the length of the key as if the key was fully checked so the check in the outer function will pass.
// Returns length of -1 to indicate non-inclusion.
return (key_be_nibbles + key_be_leading_zeroes_nibbles, rlp, -1);
} else {
let (third_item_start_word, third_item_start_offset) = felt_divmod(
third_item_starts_at_byte, 8
Expand Down

0 comments on commit 61b10f7

Please sign in to comment.