Skip to content

Commit ed6f061

Browse files
TheBlueMattandozw
authored andcommitted
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.
1 parent fb2a0b0 commit ed6f061

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/ln/features.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ mod sealed {
316316
}
317317

318318
flags[Self::BYTE_OFFSET] |= Self::REQUIRED_MASK;
319+
flags[Self::BYTE_OFFSET] &= !Self::OPTIONAL_MASK;
319320
}
320321

321322
/// Sets the feature's optional (odd) bit in the given flags.

0 commit comments

Comments
 (0)