Skip to content

Commit d28c501

Browse files
committed
fix last empty value check
1 parent d1b26ec commit d28c501

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/trie/proof.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ func VerifyRangeProof(root, first *felt.Felt, keys, values []*felt.Felt, proof *
205205
}
206206

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

0 commit comments

Comments
 (0)