chore: add root_with_updates method to sparse trie (#14393)

This commit is contained in:
Dan Cline
2025-02-11 09:47:19 -05:00
committed by GitHub
parent 1cd72206a1
commit 8e479f36d3
3 changed files with 42 additions and 17 deletions

View File

@ -1011,11 +1011,10 @@ where
debug!(target: "engine::root", num_iterations, "All proofs processed, ending calculation");
let start = Instant::now();
let root = trie.root().expect("sparse trie should be revealed");
let (root, trie_updates) = trie.root_with_updates().expect("sparse trie should be revealed");
let elapsed = start.elapsed();
metrics.sparse_trie_final_update_duration_histogram.record(elapsed);
let trie_updates = trie.take_trie_updates().expect("retention must be enabled");
Ok((root, trie_updates, num_iterations))
}