Impl Zcash(De)Serialization for Block
This commit is contained in:
parent
f5c135ee1b
commit
dab99ba861
|
|
@ -163,14 +163,19 @@ pub struct Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ZcashSerialize for Block {
|
impl ZcashSerialize for Block {
|
||||||
fn zcash_serialize<W: io::Write>(&self, _writer: W) -> Result<(), SerializationError> {
|
fn zcash_serialize<W: io::Write>(&self, mut writer: W) -> Result<(), SerializationError> {
|
||||||
unimplemented!();
|
self.header.zcash_serialize(&mut writer)?;
|
||||||
|
self.transactions.zcash_serialize(&mut writer)?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ZcashDeserialize for Block {
|
impl ZcashDeserialize for Block {
|
||||||
fn zcash_deserialize<R: io::Read>(_reader: R) -> Result<Self, SerializationError> {
|
fn zcash_deserialize<R: io::Read>(mut reader: R) -> Result<Self, SerializationError> {
|
||||||
unimplemented!();
|
Ok(Block {
|
||||||
|
header: BlockHeader::zcash_deserialize(&mut reader)?,
|
||||||
|
transactions: Vec::zcash_deserialize(&mut reader)?,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue