mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-10 16:11: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)
|
<Self as SparseMerkleTree<DEPTH>>::open(self, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a count of non-empty leaves.
|
||||||
|
pub fn leaf_count(&self) -> usize {
|
||||||
|
self.leaves.len()
|
||||||
|
}
|
||||||
|
|
||||||
// ITERATORS
|
// ITERATORS
|
||||||
// --------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user