Skip to content

Commit

Permalink
fix : failing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Oct 28, 2024
1 parent 1a74ada commit f23c810
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crypto-primitives/src/merkle_tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ impl<P: Config> MerkleTree<P> {
Ok(true)
}

/// Returns a reference to the leaf nodes of the Merkle tree.
/// Returns a reference to the leaf nodes of the Merkle tree.
/// The leaves are returned in their original order from left to right.
pub fn leaves(&self) -> &[P::LeafDigest] {
&self.leaf_nodes
Expand Down
6 changes: 2 additions & 4 deletions crypto-primitives/src/merkle_tree/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,14 @@ mod field_mt_tests {

#[test]
fn test_leaves_access() {


let tree = MerkleTree::blank().unwrap();

// Get leaf digests
let leaf_digests = tree.leaves();

// Verify the number of leaves matches
assert_eq!(leaf_digests.len(), 0);

// Verify each leaf digest matches what we expect
for (i, leaf) in leaves.iter().enumerate() {
let expected_digest = P::LeafHash::evaluate(&leaf_hash_param, leaf).unwrap();
Expand Down

0 comments on commit f23c810

Please sign in to comment.