X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=d1f6b89db4f87e968e3624289331c00c476875fe;hb=8ec7cebc184ca706ccd34ad51518fec0c818b56e;hp=c0eb8f68ac541c4ed5181713686141bd7d287139;hpb=a4a54ed9dfd8e6c725c2fdc5961cfe6b815fa958;p=rust-lightning diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index c0eb8f68..d1f6b89d 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -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 Clone for Features { } } } +impl Hash for Features { + fn hash(&self, hasher: &mut H) { + self.flags.hash(hasher); + } +} impl PartialEq for Features { fn eq(&self, o: &Self) -> bool { self.flags.eq(&o.flags)