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-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=cb823059fec283851f67cf53455ccdeafb29acba;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 a5440650d..e4018ad41 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -308,6 +308,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.