derive(Arbitrary) on MerkleTreeRootHash

This commit is contained in:
Deirdre Connolly 2020-01-31 23:30:02 -05:00 committed by Deirdre Connolly
parent d5800e168c
commit 0f4d3e4a6d
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,9 @@
use std::io;
#[cfg(test)]
use proptest_derive::Arbitrary;
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
use crate::sha256d_writer::Sha256dWriter;
use crate::transaction::Transaction;
@ -28,7 +31,8 @@ impl<Transaction> ZcashDeserialize for MerkleTree<Transaction> {
/// A SHA-256d hash of the root node of a merkle tree of SHA256-d
/// hashed transactions in a block.
#[derive(Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[cfg_attr(test, derive(Arbitrary))]
pub struct MerkleTreeRootHash(pub [u8; 32]);
impl From<MerkleTree<Transaction>> for MerkleTreeRootHash {