@@ -162,14 +162,18 @@ mod sealed {
162
162
// Byte 4
163
163
Quiescence | OnionMessages ,
164
164
// Byte 5
165
- ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments ,
165
+ ProvideStorage | ChannelType | SCIDPrivacy ,
166
166
// Byte 6
167
167
ZeroConf ,
168
168
// Byte 7
169
169
Trampoline | SimpleClose | Splice ,
170
- // Byte 8 - 130
171
- , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
172
- // Byte 131
170
+ // Byte 8 - 16
171
+ , , , , , , , , ,
172
+ // Byte 17
173
+ AnchorZeroFeeCommitmentsStaging ,
174
+ // Byte 18
175
+ ,
176
+ // Byte 19
173
177
HtlcHold ,
174
178
]
175
179
) ;
@@ -187,19 +191,23 @@ mod sealed {
187
191
// Byte 4
188
192
Quiescence | OnionMessages ,
189
193
// Byte 5
190
- ProvideStorage | ChannelType | SCIDPrivacy | AnchorZeroFeeCommitments ,
194
+ ProvideStorage | ChannelType | SCIDPrivacy ,
191
195
// Byte 6
192
196
ZeroConf | Keysend ,
193
197
// Byte 7
194
198
Trampoline | SimpleClose | Splice ,
195
- // Byte 8 - 31
196
- , , , , , , , , , , , , , , , , , , , , , , , ,
199
+ // Byte 8 - 16
200
+ , , , , , , , , ,
201
+ // Byte 17
202
+ AnchorZeroFeeCommitmentsStaging ,
203
+ // Byte 18
204
+ ,
205
+ // Byte 19
206
+ HtlcHold ,
207
+ // Byte 20 - 31
208
+ , , , , , , , , , , , ,
197
209
// Byte 32
198
210
DnsResolver ,
199
- // Byte 33 - 130
200
- , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
201
- // Byte 131
202
- HtlcHold ,
203
211
]
204
212
) ;
205
213
define_context ! ( ChannelContext , [ ] ) ;
@@ -256,9 +264,13 @@ mod sealed {
256
264
// Byte 4
257
265
,
258
266
// Byte 5
259
- SCIDPrivacy | AnchorZeroFeeCommitments ,
267
+ SCIDPrivacy ,
260
268
// Byte 6
261
269
ZeroConf ,
270
+ // Byte 7 - 16
271
+ , , , , , , , , , ,
272
+ // Byte 17
273
+ AnchorZeroFeeCommitmentsStaging ,
262
274
] ) ;
263
275
264
276
/// Defines a feature with the given bits for the specified [`Context`]s. The generated trait is
@@ -594,17 +606,6 @@ mod sealed {
594
606
supports_onion_messages,
595
607
requires_onion_messages
596
608
) ;
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
- ) ;
608
609
define_feature ! (
609
610
43 ,
610
611
ProvideStorage ,
@@ -699,18 +700,18 @@ mod sealed {
699
700
// added which we expect to appear commonly across contexts.
700
701
pub ( super ) const MIN_FEATURES_ALLOCATION_BYTES : usize = ( 63 + 7 ) / 8 ;
701
702
define_feature ! (
702
- 259 ,
703
- DnsResolver ,
704
- [ NodeContext ] ,
705
- "Feature flags for DNS resolving ." ,
706
- set_dns_resolution_optional ,
707
- set_dns_resolution_required ,
708
- clear_dns_resolution ,
709
- supports_dns_resolution ,
710
- requires_dns_resolution
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
711
712
) ;
712
713
define_feature ! (
713
- 1053 , // The BOLTs PR uses feature bit 52/53, so add +1000 for the experimental bit
714
+ 153 , // The BOLTs PR uses feature bit 52/53, so add +100 for the experimental bit
714
715
HtlcHold ,
715
716
[ InitContext , NodeContext ] ,
716
717
"Feature flags for holding HTLCs and forwarding on receipt of an onion message" ,
@@ -720,6 +721,17 @@ mod sealed {
720
721
supports_htlc_hold,
721
722
requires_htlc_hold
722
723
) ;
724
+ define_feature ! (
725
+ 259 ,
726
+ DnsResolver ,
727
+ [ NodeContext ] ,
728
+ "Feature flags for DNS resolving." ,
729
+ set_dns_resolution_optional,
730
+ set_dns_resolution_required,
731
+ clear_dns_resolution,
732
+ supports_dns_resolution,
733
+ requires_dns_resolution
734
+ ) ;
723
735
724
736
// Note: update the module-level docs when a new feature bit is added!
725
737
@@ -1074,7 +1086,7 @@ impl ChannelTypeFeatures {
1074
1086
/// Constructs a ChannelTypeFeatures with zero fee commitment anchors support.
1075
1087
pub fn anchors_zero_fee_commitments ( ) -> Self {
1076
1088
let mut ret = Self :: empty ( ) ;
1077
- <sealed:: ChannelTypeContext as sealed:: AnchorZeroFeeCommitments >:: set_required_bit (
1089
+ <sealed:: ChannelTypeContext as sealed:: AnchorZeroFeeCommitmentsStaging >:: set_required_bit (
1078
1090
& mut ret,
1079
1091
) ;
1080
1092
ret
0 commit comments