From cb823059fec283851f67cf53455ccdeafb29acba Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 21 Dec 2021 05:23:51 +0000 Subject: [PATCH] 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. --- lightning/src/ln/features.rs | 1 + 1 file changed, 1 insertion(+) 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. -- 2.39.5