Skip to content

triedb/pathdb: fix layer 5 key range in storage iterator traversal test#34883

Merged
rjl493456442 merged 1 commit into
ethereum:masterfrom
rayjun:fix/pathdb-storage-iterator-test-layer5-range
May 11, 2026
Merged

triedb/pathdb: fix layer 5 key range in storage iterator traversal test#34883
rjl493456442 merged 1 commit into
ethereum:masterfrom
rayjun:fix/pathdb-storage-iterator-test-layer5-range

Conversation

@rayjun
Copy link
Copy Markdown
Contributor

@rayjun rayjun commented May 6, 2026

Mirror the account-iterator test fix from #34639 into the sibling storage-iterator test in the same file. The layer-5 diff condition used i > 50 || i < 85, which is true for every byte in the 0..255 loop since the two ranges cover the full byte space between them.

Switch to i > 50 && i < 85 so layer 5 only covers the intended band (51..84), consistent with the fix already applied to TestAccountIteratorTraversalValues in #34639 and to both variants of TestAccountIteratorTraversalValues / TestStorageIteratorTraversalValues in core/state/snapshot/iterator_test.go from #34638.

Mirror the account-iterator test fix from ethereum#34639 into the sibling
storage-iterator test in the same file. The layer-5 diff condition used
`i > 50 || i < 85`, which is true for every byte in the 0..255 loop
since the two ranges cover the full byte space between them.

Switch to `i > 50 && i < 85` so layer 5 only covers the intended
band (51..84), consistent with the fix already applied to
TestAccountIteratorTraversalValues in ethereum#34639 and to both variants of
TestAccountIteratorTraversalValues / TestStorageIteratorTraversalValues
in core/state/snapshot/iterator_test.go from ethereum#34638.
@rayjun rayjun requested a review from rjl493456442 as a code owner May 6, 2026 04:39
@rjl493456442 rjl493456442 added this to the 1.17.3 milestone May 11, 2026
@rjl493456442 rjl493456442 merged commit 934a009 into ethereum:master May 11, 2026
9 checks passed
@rayjun rayjun deleted the fix/pathdb-storage-iterator-test-layer5-range branch May 11, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants