mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-30 20:11:23 +00:00
Refactor zcash_primitives::merkle_tree::CommitmentTreeWitness
- The internal Option wrapper was an unnecessary leftover from when this code was directly inside the prover, where Some(x) represents an assigned variable. - CommitmentTreeWitness::from_slice_with_depth is more idiomatic Rust.
This commit is contained in:
@@ -117,7 +117,7 @@ impl SaplingProvingContext {
|
||||
auth_path: witness
|
||||
.auth_path
|
||||
.iter()
|
||||
.map(|n| n.map(|(node, b)| (node.into(), b)))
|
||||
.map(|(node, b)| Some(((*node).into(), *b)))
|
||||
.collect(),
|
||||
anchor: Some(anchor),
|
||||
};
|
||||
|
Reference in New Issue
Block a user