mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 09:01:29 +01:00
Remove ExactSizeIterator constraint from SimpleSmt::with_leaves() (#228)
* Change InvalidNumEntries error * max computation * remove length check * remove ExactSizeIterator constraint * fix InvalidNumEntries error condition * 2_usize
This commit is contained in:
committed by
Bobbin Threadbare
parent
fa475d1929
commit
d719cc2663
@@ -109,9 +109,9 @@ impl PartialMerkleTree {
|
||||
|
||||
// check if the number of leaves can be accommodated by the tree's depth; we use a min
|
||||
// depth of 63 because we consider passing in a vector of size 2^64 infeasible.
|
||||
let max = (1_u64 << 63) as usize;
|
||||
let max = 2usize.pow(63);
|
||||
if layers.len() > max {
|
||||
return Err(MerkleError::InvalidNumEntries(max, layers.len()));
|
||||
return Err(MerkleError::InvalidNumEntries(max));
|
||||
}
|
||||
|
||||
// Get maximum depth
|
||||
|
||||
Reference in New Issue
Block a user