Implement core::hash::Hash more incl invoice::RawTaggedField
[rust-lightning] / lightning / src / ln / features.rs
index c0eb8f68ac541c4ed5181713686141bd7d287139..d1f6b89db4f87e968e3624289331c00c476875fe 100644 (file)
@@ -25,6 +25,7 @@
 use io;
 use prelude::*;
 use core::{cmp, fmt};
+use core::hash::{Hash, Hasher};
 use core::marker::PhantomData;
 
 use bitcoin::bech32;
@@ -362,6 +363,11 @@ impl<T: sealed::Context> Clone for Features<T> {
                }
        }
 }
+impl<T: sealed::Context> Hash for Features<T> {
+       fn hash<H: Hasher>(&self, hasher: &mut H) {
+               self.flags.hash(hasher);
+       }
+}
 impl<T: sealed::Context> PartialEq for Features<T> {
        fn eq(&self, o: &Self) -> bool {
                self.flags.eq(&o.flags)