Skip to content

Commit 32e3613

Browse files
committed
add trie table seek logs
1 parent b1d6c22 commit 32e3613

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/trie/trie/src/walker.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,16 @@ impl<C: TrieCursor> TrieWalker<C> {
190190
/// Retrieves the current root node from the DB, seeking either the exact node or the next one.
191191
fn node(&mut self, exact: bool) -> Result<Option<(Nibbles, BranchNodeCompact)>, DatabaseError> {
192192
let key = self.key().expect("key must exist").clone();
193+
194+
let key_str = format!("{key:?}");
193195
let entry = if exact { self.cursor.seek_exact(key)? } else { self.cursor.seek(key)? };
196+
trace!(
197+
target: "trie::walker_metrics",
198+
key = %key_str,
199+
?entry,
200+
exact,
201+
"Sought the trie table",
202+
);
194203

195204
if let Some((_, node)) = &entry {
196205
assert!(!node.state_mask.is_empty());

0 commit comments

Comments
 (0)