trie: fix gaped range proof test case #21484 (#1047)

Co-authored-by: gary rong <garyrong0905@gmail.com>
This commit is contained in:
Daniel Liu 2025-05-26 15:17:31 +08:00 committed by GitHub
parent 2dd50b63ed
commit b9626bfebf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -451,7 +451,7 @@ func TestBadRangeProof(t *testing.T) {
// with the first/last second element(since small values are
// embedded in the parent). Avoid this case.
index = mrand.Intn(end - start)
if (index == end-start-1 || index == 0) && end <= 100 {
if (index == 0 && start < 100) || (index == end-start-1 && end <= 100) {
continue
}
keys = append(keys[:index], keys[index+1:]...)