-
Notifications
You must be signed in to change notification settings - Fork 21.3k
trie: add sub-trie iterator support #32520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@samuelarogbonlo Please check out the commit i have made on the top rjl493456442@3dfd6cd Please let me know if it's ok to you, so that I can push it into your branch. |
Would check now |
Yes, please @rjl493456442 push it to the branch, it loosk good and has a clean structure, try to test as well or I could do it for you |
- Remove separate prefixIterator type per reviewer feedback - Add prefix and stop fields directly to nodeIterator - Implement proper subtree boundaries with both start and stop points - Simplify maintenance by avoiding unnecessary new types Co-authored-by: gballet <[email protected]>
3dfd6cd
to
45ee2fb
Compare
NodeIteratorWithPrefix()
method to support iterating only nodes within a specific key prefixNodeIteratorWithRange()
method to support iterating only nodes within a specific key rangeCurrent
NodeIterator
always traverses the entire remaining trie from a start position.For non-ethereum applications using the trie implementation, there's no way to limit
iteration to just a subtree with a specific prefix.
Usage:
Testing: Comprehensive test suite covering edge cases and boundary conditions.
Closes #32484