Skip to content

Commit

Permalink
feat: track Node::canonical_value
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Sep 29, 2024
1 parent b7357c9 commit a615e96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -93,8 +93,9 @@ pub trait Block: Debug {
)
.expect("infallible");
dev_trace!("put zktrie node: {:?}", node);
let node_bytes = cycle_track!(node.canonical_value(false), "Node::canonical_value");
cycle_track!(
db.put_owned(node_hash.as_slice(), node.canonical_value(false))?,
db.put_owned(node_hash.as_slice(), node_bytes)?,
"KVDatabase::put_owned"
);
}

0 comments on commit a615e96

Please sign in to comment.