@@ -166,15 +166,15 @@ mod sealed {
166
166
// Byte 6
167
167
ZeroConf ,
168
168
// Byte 7
169
- Trampoline | SimpleClose | Splice ,
169
+ Trampoline | SimpleClose | SpliceProduction ,
170
170
// Byte 8 - 16
171
171
, , , , , , , , ,
172
172
// Byte 17
173
173
AnchorZeroFeeCommitmentsStaging ,
174
174
// Byte 18
175
175
,
176
176
// Byte 19
177
- HtlcHold ,
177
+ HtlcHold | SplicePrototype ,
178
178
]
179
179
) ;
180
180
define_context ! (
@@ -195,15 +195,15 @@ mod sealed {
195
195
// Byte 6
196
196
ZeroConf | Keysend ,
197
197
// Byte 7
198
- Trampoline | SimpleClose | Splice ,
198
+ Trampoline | SimpleClose | SpliceProduction ,
199
199
// Byte 8 - 16
200
200
, , , , , , , , ,
201
201
// Byte 17
202
202
AnchorZeroFeeCommitmentsStaging ,
203
203
// Byte 18
204
204
,
205
205
// Byte 19
206
- HtlcHold ,
206
+ HtlcHold | SplicePrototype ,
207
207
// Byte 20 - 31
208
208
, , , , , , , , , , , ,
209
209
// Byte 32
@@ -687,14 +687,14 @@ mod sealed {
687
687
) ;
688
688
define_feature ! (
689
689
63 ,
690
- Splice ,
690
+ SpliceProduction ,
691
691
[ InitContext , NodeContext ] ,
692
692
"Feature flags for channel splicing." ,
693
- set_splicing_optional ,
694
- set_splicing_required ,
695
- clear_splicing ,
696
- supports_splicing ,
697
- requires_splicing
693
+ set_splicing_production_optional ,
694
+ set_splicing_production_required ,
695
+ clear_splicing_production ,
696
+ supports_splicing_production ,
697
+ requires_splicing_production
698
698
) ;
699
699
// By default, allocate enough bytes to cover up to Splice. Update this as new features are
700
700
// added which we expect to appear commonly across contexts.
@@ -721,6 +721,17 @@ mod sealed {
721
721
supports_htlc_hold,
722
722
requires_htlc_hold
723
723
) ;
724
+ define_feature ! (
725
+ 155 , // Splice prototype feature bit as listed in https://github.com/lightning/bolts/issues/605#issuecomment-877237519.
726
+ SplicePrototype ,
727
+ [ InitContext , NodeContext ] ,
728
+ "Feature flags for channel splicing." ,
729
+ set_splicing_optional,
730
+ set_splicing_required,
731
+ clear_splicing,
732
+ supports_splicing,
733
+ requires_splicing
734
+ ) ;
724
735
define_feature ! (
725
736
259 ,
726
737
DnsResolver ,
@@ -1431,15 +1442,27 @@ mod tests {
1431
1442
// - option_channel_type | option_scid_alias
1432
1443
// - option_zeroconf
1433
1444
// - option_simple_close | option_splice
1434
- assert_eq ! ( node_features. flags. len( ) , 8 ) ;
1445
+ assert_eq ! ( node_features. flags. len( ) , 20 ) ;
1435
1446
assert_eq ! ( node_features. flags[ 0 ] , 0b00000001 ) ;
1436
1447
assert_eq ! ( node_features. flags[ 1 ] , 0b01010001 ) ;
1437
1448
assert_eq ! ( node_features. flags[ 2 ] , 0b10001010 ) ;
1438
1449
assert_eq ! ( node_features. flags[ 3 ] , 0b00001010 ) ;
1439
1450
assert_eq ! ( node_features. flags[ 4 ] , 0b10001000 ) ;
1440
1451
assert_eq ! ( node_features. flags[ 5 ] , 0b10100000 ) ;
1441
1452
assert_eq ! ( node_features. flags[ 6 ] , 0b00001000 ) ;
1442
- assert_eq ! ( node_features. flags[ 7 ] , 0b10100000 ) ;
1453
+ assert_eq ! ( node_features. flags[ 7 ] , 0b00100000 ) ;
1454
+ assert_eq ! ( node_features. flags[ 8 ] , 0b00000000 ) ;
1455
+ assert_eq ! ( node_features. flags[ 9 ] , 0b00000000 ) ;
1456
+ assert_eq ! ( node_features. flags[ 10 ] , 0b00000000 ) ;
1457
+ assert_eq ! ( node_features. flags[ 11 ] , 0b00000000 ) ;
1458
+ assert_eq ! ( node_features. flags[ 12 ] , 0b00000000 ) ;
1459
+ assert_eq ! ( node_features. flags[ 13 ] , 0b00000000 ) ;
1460
+ assert_eq ! ( node_features. flags[ 14 ] , 0b00000000 ) ;
1461
+ assert_eq ! ( node_features. flags[ 15 ] , 0b00000000 ) ;
1462
+ assert_eq ! ( node_features. flags[ 16 ] , 0b00000000 ) ;
1463
+ assert_eq ! ( node_features. flags[ 17 ] , 0b00000000 ) ;
1464
+ assert_eq ! ( node_features. flags[ 18 ] , 0b00000000 ) ;
1465
+ assert_eq ! ( node_features. flags[ 19 ] , 0b00001000 ) ;
1443
1466
}
1444
1467
1445
1468
// Check that cleared flags are kept blank when converting back:
0 commit comments