@@ -162,13 +162,17 @@ mod sealed {
162162 // Byte 4
163163 Quiescence | OnionMessages ,
164164 // Byte 5
165- ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments ,
165+ ProvideStorage | ChannelType | SCIDPrivacy ,
166166 // Byte 6
167167 ZeroConf ,
168168 // Byte 7
169169 Trampoline | SimpleClose | Splice ,
170- // Byte 8 - 130
171- , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
170+ // Byte 8 - 16
171+ , , , , , , , , ,
172+ // Byte 17
173+ AnchorZeroFeeCommitmentsStaging ,
174+ // Byte 18 - 130
175+ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
172176 // Byte 131
173177 HtlcHold ,
174178 ]
@@ -187,13 +191,17 @@ mod sealed {
187191 // Byte 4
188192 Quiescence | OnionMessages ,
189193 // Byte 5
190- ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments ,
194+ ProvideStorage | ChannelType | SCIDPrivacy ,
191195 // Byte 6
192196 ZeroConf | Keysend ,
193197 // Byte 7
194198 Trampoline | SimpleClose | Splice ,
195- // Byte 8 - 31
196- , , , , , , , , , , , , , , , , , , , , , , , ,
199+ // Byte 8 - 16
200+ , , , , , , , , ,
201+ // Byte 17
202+ AnchorZeroFeeCommitmentsStaging ,
203+ // Byte 18 - 31
204+ , , , , , , , , , , , , , ,
197205 // Byte 32
198206 DnsResolver ,
199207 // Byte 33 - 130
@@ -256,9 +264,13 @@ mod sealed {
256264 // Byte 4
257265 ,
258266 // Byte 5
259- SCIDPrivacy | AnchorZeroFeeCommitments ,
267+ SCIDPrivacy ,
260268 // Byte 6
261269 ZeroConf ,
270+ // Byte 7 - 16
271+ , , , , , , , , , ,
272+ // Byte 17
273+ AnchorZeroFeeCommitmentsStaging ,
262274 ] ) ;
263275
264276 /// Defines a feature with the given bits for the specified [`Context`]s. The generated trait is
@@ -594,17 +606,6 @@ mod sealed {
594606 supports_onion_messages,
595607 requires_onion_messages
596608 ) ;
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- ) ;
608609 define_feature ! (
609610 43 ,
610611 ProvideStorage ,
@@ -698,6 +699,17 @@ mod sealed {
698699 // By default, allocate enough bytes to cover up to Splice. Update this as new features are
699700 // added which we expect to appear commonly across contexts.
700701 pub ( super ) const MIN_FEATURES_ALLOCATION_BYTES : usize = ( 63 + 7 ) / 8 ;
702+ define_feature ! (
703+ 141 , // The BOLTs PR uses feature bit 40/41, so add +100 for the experimental bit
704+ AnchorZeroFeeCommitmentsStaging ,
705+ [ InitContext , NodeContext , ChannelTypeContext ] ,
706+ "Feature flags for `option_zero_fee_commitments`." ,
707+ set_anchor_zero_fee_commitments_optional,
708+ set_anchor_zero_fee_commitments_required,
709+ clear_anchor_zero_fee_commitments,
710+ supports_anchor_zero_fee_commitments,
711+ requires_anchor_zero_fee_commitments
712+ ) ;
701713 define_feature ! (
702714 259 ,
703715 DnsResolver ,
@@ -1074,7 +1086,7 @@ impl ChannelTypeFeatures {
10741086 /// Constructs a ChannelTypeFeatures with zero fee commitment anchors support.
10751087 pub fn anchors_zero_fee_commitments ( ) -> Self {
10761088 let mut ret = Self :: empty ( ) ;
1077- <sealed:: ChannelTypeContext as sealed:: AnchorZeroFeeCommitments >:: set_required_bit (
1089+ <sealed:: ChannelTypeContext as sealed:: AnchorZeroFeeCommitmentsStaging >:: set_required_bit (
10781090 & mut ret,
10791091 ) ;
10801092 ret
0 commit comments