mirror of https://github.com/zcash/orchard.git
Add nullifier field to `CompactAction`
Also reorders the fields to match the ZIP 244 order. Closes zcash/orchard#243.
This commit is contained in:
parent
a30caec124
commit
c0b7fa2007
|
@ -268,8 +268,9 @@ impl<T> ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for Action<T> {
|
||||||
|
|
||||||
/// A compact Action for light clients.
|
/// A compact Action for light clients.
|
||||||
pub struct CompactAction {
|
pub struct CompactAction {
|
||||||
ephemeral_key: EphemeralKeyBytes,
|
nullifier: Nullifier,
|
||||||
cmx: ExtractedNoteCommitment,
|
cmx: ExtractedNoteCommitment,
|
||||||
|
ephemeral_key: EphemeralKeyBytes,
|
||||||
enc_ciphertext: [u8; 52],
|
enc_ciphertext: [u8; 52],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,8 +283,9 @@ impl fmt::Debug for CompactAction {
|
||||||
impl<T> From<&Action<T>> for CompactAction {
|
impl<T> From<&Action<T>> for CompactAction {
|
||||||
fn from(action: &Action<T>) -> Self {
|
fn from(action: &Action<T>) -> Self {
|
||||||
CompactAction {
|
CompactAction {
|
||||||
ephemeral_key: action.ephemeral_key(),
|
nullifier: *action.nullifier(),
|
||||||
cmx: *action.cmx(),
|
cmx: *action.cmx(),
|
||||||
|
ephemeral_key: action.ephemeral_key(),
|
||||||
enc_ciphertext: action.encrypted_note().enc_ciphertext[..52]
|
enc_ciphertext: action.encrypted_note().enc_ciphertext[..52]
|
||||||
.try_into()
|
.try_into()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
|
|
Loading…
Reference in New Issue