This repository was archived by the owner on Jan 9, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ struct SeekedHashedEntry<V> {
4343 result : Option < ( B256 , V ) > ,
4444}
4545
46- /// An iterator over existing intermediate branch nodes and updated leaf nodes.
46+ /// Iterates over trie nodes for hash building.
47+ ///
48+ /// This iterator depends on the ordering guarantees of [`TrieCursor`],
49+ /// and additionally uses hashed cursor lookups when operating on storage tries.
4750#[ derive( Debug ) ]
4851pub struct TrieNodeIter < C , H : HashedCursor > {
4952 /// The walker over intermediate nodes.
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ pub trait TrieCursorFactory {
3535 ) -> Result < Self :: StorageTrieCursor , DatabaseError > ;
3636}
3737
38- /// A cursor for navigating a trie that works with both Tables and `DupSort` tables.
38+ /// A cursor for traversing stored trie nodes. The cursor must iterate over keys in
39+ /// lexicographical order.
3940#[ auto_impl:: auto_impl( & mut , Box ) ]
4041pub trait TrieCursor : Send + Sync {
4142 /// Move the cursor to the key and return if it is an exact match.
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ use tracing::{instrument, trace};
1010#[ cfg( feature = "metrics" ) ]
1111use crate :: metrics:: WalkerMetrics ;
1212
13- /// `TrieWalker` is a structure that enables traversal of a Merkle trie .
14- /// It allows moving through the trie in a depth-first manner, skipping certain branches
15- /// if they have not changed .
13+ /// Traverses the trie in lexicographic order .
14+ ///
15+ /// This iterator depends on the ordering guarantees of [`TrieCursor`] .
1616#[ derive( Debug ) ]
1717pub struct TrieWalker < C > {
1818 /// A mutable reference to a trie cursor instance used for navigating the trie.
You can’t perform that action at this time.
0 commit comments