mirror of https://github.com/zcash/halo2.git
Go ahead and clone IVKs to limit borrowing hassles.
This commit is contained in:
parent
d8bf892c72
commit
c803114bf6
|
@ -364,15 +364,15 @@ impl<T: Authorization, V> Bundle<T, V> {
|
||||||
/// along with the index of the action from which it was derived.
|
/// along with the index of the action from which it was derived.
|
||||||
pub fn decrypt_outputs_for_keys<'a>(
|
pub fn decrypt_outputs_for_keys<'a>(
|
||||||
&self,
|
&self,
|
||||||
keys: &[&'a IncomingViewingKey],
|
keys: &[IncomingViewingKey],
|
||||||
) -> Vec<(usize, &'a IncomingViewingKey, Note, Address, [u8; 512])> {
|
) -> Vec<(usize, IncomingViewingKey, Note, Address, [u8; 512])> {
|
||||||
self.actions
|
self.actions
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter_map(|(idx, action)| {
|
.filter_map(|(idx, action)| {
|
||||||
let domain = OrchardDomain::for_action(action);
|
let domain = OrchardDomain::for_action(action);
|
||||||
keys.iter().find_map(move |ivk| {
|
keys.iter().find_map(move |ivk| {
|
||||||
try_note_decryption(&domain, ivk, action).map(|(n, a, m)| (idx, *ivk, n, a, m))
|
try_note_decryption(&domain, ivk, action).map(|(n, a, m)| (idx, ivk.clone(), n, a, m))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
|
|
Loading…
Reference in New Issue