chore: TSMT benchmark

This commit is contained in:
Andrey Khmuro
2023-08-14 12:34:14 +02:00
parent 7780a50dad
commit 2214ff2425
4 changed files with 194 additions and 1 deletions

View File

@@ -274,6 +274,12 @@ impl TieredSmt {
})
}
/// Returns an iterator over upper leaves (i.e., depth = 16, 32, or 48) for this [TieredSmt]
/// where each yielded item is a (node_index, value) tuple.
pub fn upper_leaf_nodes(&self) -> impl Iterator<Item = (&NodeIndex, &RpoDigest)> {
self.nodes.upper_leaves()
}
/// Returns an iterator over bottom leaves (i.e., depth = 64) of this [TieredSmt].
///
/// Each yielded item consists of the hash of the leaf and its contents, where contents is