|
|
@@ -40,7 +40,7 @@ lazy_static! {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
-#[derive(Debug, Copy, Clone, Eq)]
|
|
|
+#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
|
|
pub struct MerkleNode(pub pallas::Base);
|
|
|
|
|
|
impl MerkleNode {
|
|
|
@@ -76,12 +76,6 @@ impl<'de> Deserialize<'de> for MerkleNode {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-impl std::cmp::PartialEq for MerkleNode {
|
|
|
- fn eq(&self, other: &Self) -> bool {
|
|
|
- self.0.ct_eq(&other.0).into()
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
impl std::hash::Hash for MerkleNode {
|
|
|
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
|
<Option<pallas::Base>>::from(self.0).map(|b| b.to_repr()).hash(state)
|