Skip to content

Commit

Permalink
Fix Orchard ZSA issuance serialization (use to_vec for notes and asse…
Browse files Browse the repository at this point in the history
…t_desc to convert slice to vec, as slices require implementation of the serialization from scratch
  • Loading branch information
dmidem committed Oct 17, 2024
1 parent 018203e commit d2313fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zebra-chain/src/orchard_zsa/issuance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::{fmt::Debug, io};
use crate::{
block::MAX_BLOCK_BYTES,
serialization::{
zcash_serialize_empty_list, ReadZcashExt, SerializationError, TrustedPreallocate,
ZcashDeserialize, ZcashDeserializeInto, ZcashSerialize,
zcash_serialize_bytes, zcash_serialize_empty_list, ReadZcashExt, SerializationError,
TrustedPreallocate, ZcashDeserialize, ZcashDeserializeInto, ZcashSerialize,
},
};

Expand Down Expand Up @@ -176,8 +176,8 @@ impl TrustedPreallocate for Note {
impl ZcashSerialize for IssueAction {
fn zcash_serialize<W: io::Write>(&self, mut writer: W) -> Result<(), io::Error> {
writer.write_u8(self.is_finalized().as_u8())?;
self.notes().zcash_serialize(&mut writer)?;
self.asset_desc().zcash_serialize(&mut writer)?;
self.notes().to_vec().zcash_serialize(&mut writer)?;
zcash_serialize_bytes(&self.asset_desc().to_vec(), &mut writer)?;
Ok(())
}
}
Expand Down

0 comments on commit d2313fb

Please sign in to comment.