From 5f6bf188ff7dfd6475e4a5eeb94aab55d4426c5b Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 7 Feb 2020 09:22:33 -0800 Subject: [PATCH] Derive Hash for BlockHeaderHash. This allows using BlockHeaderHashes in HashSets, HashMaps, etc. --- zebra-chain/src/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-chain/src/block.rs b/zebra-chain/src/block.rs index 886512a4..906a69d2 100644 --- a/zebra-chain/src/block.rs +++ b/zebra-chain/src/block.rs @@ -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]);