diff --git a/zcash_client_backend/src/scan.rs b/zcash_client_backend/src/scan.rs index a568be4f0..fc72ce313 100644 --- a/zcash_client_backend/src/scan.rs +++ b/zcash_client_backend/src/scan.rs @@ -11,8 +11,8 @@ use memuse::DynamicUsage; use zcash_note_encryption::{batch, BatchDomain, Domain, ShieldedOutput, COMPACT_NOTE_SIZE}; use zcash_primitives::{block::BlockHash, transaction::TxId}; -/// A decrypted note. -pub(crate) struct DecryptedNote { +/// A decrypted transaction output. +pub(crate) struct DecryptedOutput { /// The tag corresponding to the incoming viewing key used to decrypt the note. pub(crate) ivk_tag: A, /// The recipient of the note. @@ -21,7 +21,7 @@ pub(crate) struct DecryptedNote { pub(crate) note: D::Note, } -impl fmt::Debug for DecryptedNote +impl fmt::Debug for DecryptedOutput where A: fmt::Debug, D::IncomingViewingKey: fmt::Debug, @@ -30,7 +30,7 @@ where D::Memo: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("DecryptedNote") + f.debug_struct("DecryptedOutput") .field("ivk_tag", &self.ivk_tag) .field("recipient", &self.recipient) .field("note", &self.note) @@ -46,7 +46,7 @@ struct OutputIndex { value: V, } -type OutputItem = OutputIndex>; +type OutputItem = OutputIndex>; /// The sender for the result of batch scanning a specific transaction output. struct OutputReplier(OutputIndex>>); @@ -307,7 +307,7 @@ where if let Some(((note, recipient), ivk_idx)) = decryption_result { let result = OutputIndex { output_index: replier.output_index, - value: DecryptedNote { + value: DecryptedOutput { ivk_tag: tags[ivk_idx].clone(), recipient, note, @@ -487,7 +487,7 @@ where &mut self, block_tag: BlockHash, txid: TxId, - ) -> HashMap<(TxId, usize), DecryptedNote> { + ) -> HashMap<(TxId, usize), DecryptedOutput> { self.pending_results .remove(&ResultKey(block_tag, txid)) // We won't have a pending result if the transaction didn't have outputs of diff --git a/zcash_client_backend/src/scanning.rs b/zcash_client_backend/src/scanning.rs index afd38fc0b..b0bad39cc 100644 --- a/zcash_client_backend/src/scanning.rs +++ b/zcash_client_backend/src/scanning.rs @@ -524,13 +524,13 @@ pub(crate) fn scan_block_with_runner< let mut decrypted = runner.collect_results(cur_hash, txid); (0..decoded.len()) .map(|i| { - decrypted.remove(&(txid, i)).map(|d_note| { - let a = d_note.ivk_tag.0; - let nk = vks.get(&d_note.ivk_tag).expect( + decrypted.remove(&(txid, i)).map(|d_out| { + let a = d_out.ivk_tag.0; + let nk = vks.get(&d_out.ivk_tag).expect( "The batch runner and scan_block must use the same set of IVKs.", ); - (d_note.note, a, d_note.ivk_tag.1, (*nk).clone()) + (d_out.note, a, d_out.ivk_tag.1, (*nk).clone()) }) }) .collect()