Skip to content

Commit

Permalink
fix last empty value check
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Dec 5, 2024
1 parent d1b26ec commit d28c501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/trie/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ func VerifyRangeProof(root, first *felt.Felt, keys, values []*felt.Felt, proof *
}

// Ensure all keys are monotonically increasing and values contain no deletions
for i := 0; i < len(keys)-1; i++ {
if keys[i].Cmp(keys[i+1]) > 0 {
for i := 0; i < len(keys); i++ {
if i < len(keys)-1 && keys[i].Cmp(keys[i+1]) > 0 {
return false, errors.New("keys are not monotonic increasing")
}

Expand Down

0 comments on commit d28c501

Please sign in to comment.