From: Matt Corallo Date: Tue, 7 Jan 2020 02:50:55 +0000 (-0500) Subject: Avoid treating option_upfront_shutdown (req) as unknown_required. X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e325598e674022af82ef5f976e9b11f430fb71bf;p=rust-lightning Avoid treating option_upfront_shutdown (req) as unknown_required. This fixes the bitmask in requires_unknown_bits. --- diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index dd0b7fa1a..d7e0299e8 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -187,7 +187,7 @@ impl Features { 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