]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Avoid treating option_upfront_shutdown (req) as unknown_required.
authorMatt Corallo <git@bluematt.me>
Tue, 7 Jan 2020 02:50:55 +0000 (21:50 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 3 Feb 2020 02:38:53 +0000 (21:38 -0500)
This fixes the bitmask in requires_unknown_bits.

lightning/src/ln/features.rs

index dd0b7fa1a82aba540a259bd18ede2b5156c9eef1..d7e0299e8876143b09a2052d6380c842a257b827 100644 (file)
@@ -187,7 +187,7 @@ impl<T: sealed::Context> Features<T> {
        pub(crate) fn requires_unknown_bits(&self) -> bool {
                self.flags.iter().enumerate().any(|(idx, &byte)| {
                        (match idx {
-                               0 => (byte & 0b00010100),
+                               0 => (byte & 0b01000100),
                                1 => (byte & 0b01010100),
                                _ => (byte & 0b01010101),
                        }) != 0