Merge pull request #361 from stevenroose/inventory-hash
Implement std:#️⃣:Hash for Inventory
This commit is contained in:
commit
1d209362eb
|
@ -76,6 +76,12 @@ pub struct Inventory {
|
|||
pub hash: sha256d::Hash
|
||||
}
|
||||
|
||||
impl ::std::hash::Hash for Inventory {
|
||||
fn hash<H: ::std::hash::Hasher>(&self, state: &mut H) {
|
||||
self.hash.hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
impl GetBlocksMessage {
|
||||
/// Construct a new `getblocks` message
|
||||
pub fn new(locator_hashes: Vec<sha256d::Hash>, stop_hash: sha256d::Hash) -> GetBlocksMessage {
|
||||
|
|
Loading…
Reference in New Issue