Derive Hash for BlockHeaderHash.

This allows using BlockHeaderHashes in HashSets, HashMaps, etc.
This commit is contained in:
Henry de Valence 2020-02-07 09:22:33 -08:00
parent ebf60b8840
commit 5f6bf188ff
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ use crate::transaction::Transaction;
/// the direct bytes of the transactions as well as the header. So
/// for now I want to call it a `BlockHeaderHash` because that's
/// more explicit.
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
#[cfg_attr(test, derive(Arbitrary))]
pub struct BlockHeaderHash(pub [u8; 32]);