mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-09 23:51:30 +01:00
feat: add leaf count to SimpleSmt (#302)
This commit is contained in:
@@ -152,6 +152,11 @@ impl<const DEPTH: u8> SimpleSmt<DEPTH> {
|
||||
<Self as SparseMerkleTree<DEPTH>>::open(self, key)
|
||||
}
|
||||
|
||||
/// Returns a count of non-empty leaves.
|
||||
pub fn leaf_count(&self) -> usize {
|
||||
self.leaves.len()
|
||||
}
|
||||
|
||||
// ITERATORS
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user