diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 39fb60f634..6486e8142c 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -290,6 +290,7 @@ and this library adheres to Rust's notion of - `SentTransactionOutput::sapling_change_to` - the note created by an internal transfer is now conveyed in the `recipient` field. - `WalletSaplingSpend` use the generic `WalletSpend` instead. + - `WalletSaplingOutput::cmu` obtain `cmu` from the `Note` instead. - `zcash_client_backend::data_api`: - `{PoolType, ShieldedProtocol}` (moved to `zcash_client_backend`). - `{NoteId, Recipient}` (moved to `zcash_client_backend::wallet`). diff --git a/zcash_client_backend/src/scanning.rs b/zcash_client_backend/src/scanning.rs index 9e020f4f17..ba2fb6e92f 100644 --- a/zcash_client_backend/src/scanning.rs +++ b/zcash_client_backend/src/scanning.rs @@ -746,7 +746,6 @@ pub(crate) fn scan_block_with_runners< |output_idx, output, note, is_change, position, nf, key_source| { WalletSaplingOutput::from_parts( output_idx, - output.cmu, output.ephemeral_key.clone(), note, is_change, @@ -786,7 +785,6 @@ pub(crate) fn scan_block_with_runners< |output_idx, output, note, is_change, position, nf, key_source| { WalletOrchardOutput::from_parts( output_idx, - output.cmx(), output.ephemeral_key(), note, is_change, diff --git a/zcash_client_backend/src/wallet.rs b/zcash_client_backend/src/wallet.rs index 562d9dc628..9a4313c78d 100644 --- a/zcash_client_backend/src/wallet.rs +++ b/zcash_client_backend/src/wallet.rs @@ -275,7 +275,6 @@ impl KeySource { /// [`OutputDescription`]: sapling::bundle::OutputDescription pub struct WalletSaplingOutput { index: usize, - cmu: sapling::note::ExtractedNoteCommitment, ephemeral_key: EphemeralKeyBytes, note: sapling::Note, is_change: bool, @@ -289,7 +288,6 @@ impl WalletSaplingOutput { #[allow(clippy::too_many_arguments)] pub fn from_parts( index: usize, - cmu: sapling::note::ExtractedNoteCommitment, ephemeral_key: EphemeralKeyBytes, note: sapling::Note, is_change: bool, @@ -299,7 +297,6 @@ impl WalletSaplingOutput { ) -> Self { Self { index, - cmu, ephemeral_key, note, is_change, @@ -313,12 +310,7 @@ impl WalletSaplingOutput { pub fn index(&self) -> usize { self.index } - /// The [`sapling::note::ExtractedNoteCommitment`] for the `sapling::Note` created - /// by this output. - pub fn cmu(&self) -> &sapling::note::ExtractedNoteCommitment { - &self.cmu - } - /// The [`EphemeralKeyBytes`] used in the decryption of this [`sapling::Note`]. + /// The [`EphemeralKeyBytes`] of the transaction output. pub fn ephemeral_key(&self) -> &EphemeralKeyBytes { &self.ephemeral_key } @@ -348,7 +340,6 @@ impl WalletSaplingOutput { #[cfg(feature = "orchard")] pub struct WalletOrchardOutput { index: usize, - cmx: orchard::note::ExtractedNoteCommitment, ephemeral_key: EphemeralKeyBytes, note: orchard::note::Note, is_change: bool, @@ -366,7 +357,6 @@ impl WalletOrchardOutput { #[allow(clippy::too_many_arguments)] pub fn from_parts( index: usize, - cmx: orchard::note::ExtractedNoteCommitment, ephemeral_key: EphemeralKeyBytes, note: orchard::note::Note, is_change: bool, @@ -376,7 +366,6 @@ impl WalletOrchardOutput { ) -> Self { Self { index, - cmx, ephemeral_key, note, is_change, @@ -390,12 +379,7 @@ impl WalletOrchardOutput { pub fn index(&self) -> usize { self.index } - /// The [`orchard::note::ExtractedNoteCommitment`] for the `orchard::note::Note` created by - /// the associated action. - pub fn cmx(&self) -> &orchard::note::ExtractedNoteCommitment { - &self.cmx - } - /// The [`EphemeralKeyBytes`] used in the decryption of this [`sapling::Note`]. + /// The [`EphemeralKeyBytes`] of the transaction output. pub fn ephemeral_key(&self) -> &EphemeralKeyBytes { &self.ephemeral_key }