Merge pull request #517 from stevenroose/inv-ord
Implement PartialOrd and Ord for Inventory
This commit is contained in:
commit
ac7bf8099b
|
@ -27,7 +27,7 @@ use consensus::encode::{self, Decodable, Encodable};
|
||||||
use hash_types::{BlockHash, Txid, Wtxid};
|
use hash_types::{BlockHash, Txid, Wtxid};
|
||||||
|
|
||||||
/// An inventory item.
|
/// An inventory item.
|
||||||
#[derive(PartialEq, Eq, Clone, Debug, Copy, Hash)]
|
#[derive(PartialEq, Eq, Clone, Debug, Copy, Hash, PartialOrd, Ord)]
|
||||||
pub enum Inventory {
|
pub enum Inventory {
|
||||||
/// Error --- these inventories can be ignored
|
/// Error --- these inventories can be ignored
|
||||||
Error,
|
Error,
|
||||||
|
|
Loading…
Reference in New Issue