Implement std:#️⃣:Hash for Inventory
This commit is contained in:
parent
854718219e
commit
b4c4a9658d
|
@ -76,6 +76,12 @@ pub struct Inventory {
|
||||||
pub hash: sha256d::Hash
|
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 {
|
impl GetBlocksMessage {
|
||||||
/// Construct a new `getblocks` message
|
/// Construct a new `getblocks` message
|
||||||
pub fn new(locator_hashes: Vec<sha256d::Hash>, stop_hash: sha256d::Hash) -> GetBlocksMessage {
|
pub fn new(locator_hashes: Vec<sha256d::Hash>, stop_hash: sha256d::Hash) -> GetBlocksMessage {
|
||||||
|
|
Loading…
Reference in New Issue