Merge pull request #320 from zcash/243-compact-action-nullifier

Add nullifier field to `CompactAction`
This commit is contained in:
str4d 2022-05-04 16:27:03 +01:00 committed by GitHub
commit dc89386df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -268,8 +268,9 @@ impl<T> ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for Action<T> {
/// A compact Action for light clients.
pub struct CompactAction {
ephemeral_key: EphemeralKeyBytes,
nullifier: Nullifier,
cmx: ExtractedNoteCommitment,
ephemeral_key: EphemeralKeyBytes,
enc_ciphertext: [u8; 52],
}
@ -282,8 +283,9 @@ impl fmt::Debug for CompactAction {
impl<T> From<&Action<T>> for CompactAction {
fn from(action: &Action<T>) -> Self {
CompactAction {
ephemeral_key: action.ephemeral_key(),
nullifier: *action.nullifier(),
cmx: *action.cmx(),
ephemeral_key: action.ephemeral_key(),
enc_ciphertext: action.encrypted_note().enc_ciphertext[..52]
.try_into()
.unwrap(),