Skip to content

Commit 9b82567

Browse files
committed
Tweak
1 parent 93e0e8d commit 9b82567

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/merkle_tree/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl<P: Config> MerkleTree<P> {
235235
) -> Result<Self, crate::Error> {
236236
// use empty leaf digest
237237
let leaf_digests = vec![P::LeafDigest::default(); 1 << (height - 1)];
238-
Self::new_with_leaf_digest(leaf_hash_param, two_to_one_hash_param, &leaf_digests)
238+
Self::new_with_leaf_digest(leaf_hash_param, two_to_one_hash_param, leaf_digests)
239239
}
240240

241241
/// Returns a new merkle tree. `leaves.len()` should be power of two.
@@ -249,13 +249,13 @@ impl<P: Config> MerkleTree<P> {
249249
.map(|input| P::LeafHash::evaluate(leaf_hash_param, input.as_ref()))
250250
.collect::<Result<Vec<_>, _>>()?;
251251

252-
Self::new_with_leaf_digest(leaf_hash_param, two_to_one_hash_param, &leaf_digests)
252+
Self::new_with_leaf_digest(leaf_hash_param, two_to_one_hash_param, leaf_digests)
253253
}
254254

255255
pub fn new_with_leaf_digest(
256256
leaf_hash_param: &LeafParam<P>,
257257
two_to_one_hash_param: &TwoToOneParam<P>,
258-
leaf_digests: &[P::LeafDigest],
258+
leaf_digests: Vec<P::LeafDigest>,
259259
) -> Result<Self, crate::Error> {
260260
let leaf_nodes_size = leaf_digests.len();
261261
assert!(

0 commit comments

Comments
 (0)