From 1b29a55e17b50ab86edef70d4d9e1feb27af839a 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 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. -- 2.39.5