Merge pull request #321 from tamasblummer/add_serde_to_block

[TRIVIAL] enable serde serialization for block and blockheader
This commit is contained in:
Steven Roose 2019-09-05 09:36:57 +01:00 committed by GitHub
commit de9ccdec89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -205,6 +205,8 @@ impl BitcoinHash for Block {
impl_consensus_encoding!(BlockHeader, version, prev_blockhash, merkle_root, time, bits, nonce); impl_consensus_encoding!(BlockHeader, version, prev_blockhash, merkle_root, time, bits, nonce);
impl_consensus_encoding!(Block, header, txdata); impl_consensus_encoding!(Block, header, txdata);
serde_struct_impl!(BlockHeader, version, prev_blockhash, merkle_root, time, bits, nonce);
serde_struct_impl!(Block, header, txdata);
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {