Skip to content

Commit a737eb8

Browse files
authored
Merge pull request #4515 from tankyleo/2026-03-switch-0fc-to-prod-feature-bit
Switch 0FC to production feature bit
2 parents 8fc122d + 5ab28b1 commit a737eb8

1 file changed

Lines changed: 19 additions & 31 deletions

File tree

lightning-types/src/features.rs

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,13 @@ mod sealed {
162162
// Byte 4
163163
Quiescence | OnionMessages,
164164
// Byte 5
165-
ProvideStorage | ChannelType | SCIDPrivacy,
165+
AnchorZeroFeeCommitments | ProvideStorage | ChannelType | SCIDPrivacy,
166166
// Byte 6
167167
ZeroConf,
168168
// Byte 7
169169
Trampoline | SimpleClose | Splice,
170-
// Byte 8 - 16
171-
,,,,,,,,,
172-
// Byte 17
173-
AnchorZeroFeeCommitmentsStaging,
174-
// Byte 18
175-
,
170+
// Byte 8 - 18
171+
,,,,,,,,,,,
176172
// Byte 19
177173
HtlcHold,
178174
]
@@ -191,17 +187,13 @@ mod sealed {
191187
// Byte 4
192188
Quiescence | OnionMessages,
193189
// Byte 5
194-
ProvideStorage | ChannelType | SCIDPrivacy,
190+
AnchorZeroFeeCommitments | ProvideStorage | ChannelType | SCIDPrivacy,
195191
// Byte 6
196192
ZeroConf | Keysend,
197193
// Byte 7
198194
Trampoline | SimpleClose | Splice,
199-
// Byte 8 - 16
200-
,,,,,,,,,
201-
// Byte 17
202-
AnchorZeroFeeCommitmentsStaging,
203-
// Byte 18
204-
,
195+
// Byte 8 - 18
196+
,,,,,,,,,,,
205197
// Byte 19
206198
HtlcHold,
207199
// Byte 20 - 31
@@ -264,13 +256,9 @@ mod sealed {
264256
// Byte 4
265257
,
266258
// Byte 5
267-
SCIDPrivacy,
259+
AnchorZeroFeeCommitments | SCIDPrivacy,
268260
// Byte 6
269261
ZeroConf,
270-
// Byte 7 - 16
271-
,,,,,,,,,,
272-
// Byte 17
273-
AnchorZeroFeeCommitmentsStaging,
274262
]);
275263

276264
/// Defines a feature with the given bits for the specified [`Context`]s. The generated trait is
@@ -606,6 +594,17 @@ mod sealed {
606594
supports_onion_messages,
607595
requires_onion_messages
608596
);
597+
define_feature!(
598+
41,
599+
AnchorZeroFeeCommitments,
600+
[InitContext, NodeContext, ChannelTypeContext],
601+
"Feature flags for `option_zero_fee_commitments`.",
602+
set_anchor_zero_fee_commitments_optional,
603+
set_anchor_zero_fee_commitments_required,
604+
clear_anchor_zero_fee_commitments,
605+
supports_anchor_zero_fee_commitments,
606+
requires_anchor_zero_fee_commitments
607+
);
609608
define_feature!(
610609
43,
611610
ProvideStorage,
@@ -707,17 +706,6 @@ mod sealed {
707706
// By default, allocate enough bytes to cover up to Splice. Update this as new features are
708707
// added which we expect to appear commonly across contexts.
709708
pub(super) const MIN_FEATURES_ALLOCATION_BYTES: usize = 63_usize.div_ceil(8);
710-
define_feature!(
711-
141, // The BOLTs PR uses feature bit 40/41, so add +100 for the experimental bit
712-
AnchorZeroFeeCommitmentsStaging,
713-
[InitContext, NodeContext, ChannelTypeContext],
714-
"Feature flags for `option_zero_fee_commitments`.",
715-
set_anchor_zero_fee_commitments_optional,
716-
set_anchor_zero_fee_commitments_required,
717-
clear_anchor_zero_fee_commitments,
718-
supports_anchor_zero_fee_commitments,
719-
requires_anchor_zero_fee_commitments
720-
);
721709
define_feature!(
722710
153, // The BOLTs PR uses feature bit 52/53, so add +100 for the experimental bit
723711
HtlcHold,
@@ -1094,7 +1082,7 @@ impl ChannelTypeFeatures {
10941082
/// Constructs a ChannelTypeFeatures with zero fee commitment anchors support.
10951083
pub fn anchors_zero_fee_commitments() -> Self {
10961084
let mut ret = Self::empty();
1097-
<sealed::ChannelTypeContext as sealed::AnchorZeroFeeCommitmentsStaging>::set_required_bit(
1085+
<sealed::ChannelTypeContext as sealed::AnchorZeroFeeCommitments>::set_required_bit(
10981086
&mut ret,
10991087
);
11001088
ret

0 commit comments

Comments
 (0)