From b4c4a9658ded873c7cce1e8a1fbc629fa726d0d0 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Sun, 8 Dec 2019 17:44:51 +0000 Subject: [PATCH] Implement std::hash::Hash for Inventory --- src/network/message_blockdata.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/message_blockdata.rs b/src/network/message_blockdata.rs index c484bc78..c49d0072 100644 --- a/src/network/message_blockdata.rs +++ b/src/network/message_blockdata.rs @@ -76,6 +76,12 @@ pub struct Inventory { pub hash: sha256d::Hash } +impl ::std::hash::Hash for Inventory { + fn hash(&self, state: &mut H) { + self.hash.hash(state) + } +} + impl GetBlocksMessage { /// Construct a new `getblocks` message pub fn new(locator_hashes: Vec, stop_hash: sha256d::Hash) -> GetBlocksMessage {