Skip to content

Commit e9fd567

Browse files
authored
Merge pull request #4387 from TheBlueMatt/2026-02-stop-squatting-features
Switch `SplicePrototype` feature flag to the prod feature bit
2 parents 372ba65 + 5427b0d commit e9fd567

1 file changed

Lines changed: 13 additions & 36 deletions

File tree

lightning-types/src/features.rs

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ mod sealed {
166166
// Byte 6
167167
ZeroConf,
168168
// Byte 7
169-
Trampoline | SimpleClose | SpliceProduction,
169+
Trampoline | SimpleClose | Splice,
170170
// Byte 8 - 16
171171
,,,,,,,,,
172172
// Byte 17
173173
AnchorZeroFeeCommitmentsStaging,
174174
// Byte 18
175175
,
176176
// Byte 19
177-
HtlcHold | SplicePrototype,
177+
HtlcHold,
178178
]
179179
);
180180
define_context!(
@@ -195,15 +195,15 @@ mod sealed {
195195
// Byte 6
196196
ZeroConf | Keysend,
197197
// Byte 7
198-
Trampoline | SimpleClose | SpliceProduction,
198+
Trampoline | SimpleClose | Splice,
199199
// Byte 8 - 16
200200
,,,,,,,,,
201201
// Byte 17
202202
AnchorZeroFeeCommitmentsStaging,
203203
// Byte 18
204204
,
205205
// Byte 19
206-
HtlcHold | SplicePrototype,
206+
HtlcHold,
207207
// Byte 20 - 31
208208
,,,,,,,,,,,,
209209
// Byte 32
@@ -687,14 +687,14 @@ mod sealed {
687687
);
688688
define_feature!(
689689
63,
690-
SpliceProduction,
690+
Splice,
691691
[InitContext, NodeContext],
692692
"Feature flags for channel splicing.",
693-
set_splicing_production_optional,
694-
set_splicing_production_required,
695-
clear_splicing_production,
696-
supports_splicing_production,
697-
requires_splicing_production
693+
set_splicing_optional,
694+
set_splicing_required,
695+
clear_splicing,
696+
supports_splicing,
697+
requires_splicing
698698
);
699699
// By default, allocate enough bytes to cover up to Splice. Update this as new features are
700700
// added which we expect to appear commonly across contexts.
@@ -721,17 +721,6 @@ mod sealed {
721721
supports_htlc_hold,
722722
requires_htlc_hold
723723
);
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-
);
735724
define_feature!(
736725
259,
737726
DnsResolver,
@@ -1441,28 +1430,16 @@ mod tests {
14411430
// - onion_messages
14421431
// - option_channel_type | option_scid_alias
14431432
// - option_zeroconf
1444-
// - option_simple_close | option_splice
1445-
assert_eq!(node_features.flags.len(), 20);
1433+
// - option_simple_close
1434+
assert_eq!(node_features.flags.len(), 8);
14461435
assert_eq!(node_features.flags[0], 0b00000001);
14471436
assert_eq!(node_features.flags[1], 0b01010001);
14481437
assert_eq!(node_features.flags[2], 0b10001010);
14491438
assert_eq!(node_features.flags[3], 0b00001010);
14501439
assert_eq!(node_features.flags[4], 0b10001000);
14511440
assert_eq!(node_features.flags[5], 0b10100000);
14521441
assert_eq!(node_features.flags[6], 0b00001000);
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);
1442+
assert_eq!(node_features.flags[7], 0b10100000);
14661443
}
14671444

14681445
// Check that cleared flags are kept blank when converting back:

0 commit comments

Comments
 (0)