From: Matt Corallo Date: Tue, 21 Dec 2021 05:23:51 +0000 (+0000) Subject: Unset the optional bit for a feature when setting the required bit X-Git-Tag: v0.0.115~14^2~12 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=1b29a55e17b50ab86edef70d4d9e1feb27af839a;p=rust-lightning Unset the optional bit for a feature when setting the required bit There is no reason to set both, and this currently makes testing the new BOLT invoice tests slightly harder, so we just unset it. --- diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 47e1cbcc4..cf375603b 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -275,6 +275,7 @@ mod sealed { } flags[Self::BYTE_OFFSET] |= Self::REQUIRED_MASK; + flags[Self::BYTE_OFFSET] &= !Self::OPTIONAL_MASK; } /// Sets the feature's optional (odd) bit in the given flags.