return to use n

This commit is contained in:
Just van Stam 2024-09-13 15:15:21 +02:00
parent 9cfa3a2864
commit 8ec74900bb
No known key found for this signature in database

View File

@ -151,7 +151,7 @@ impl MerkleTree {
}
pub fn calc_merkle_proof(&self, branch_idx: usize) -> Result<MerkleBranch> {
if branch_idx >= self.hashed_leafs.len() {
if branch_idx >= self.n {
return Err(anyhow!("Invalid branch index"));
}