Skip to content

Commit 5840374

Browse files
features: advertise wumbo channels as supported
1 parent 83595db commit 5840374

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lightning/src/ln/features.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ mod sealed {
137137
// Byte 1
138138
,
139139
// Byte 2
140-
BasicMPP,
140+
BasicMPP | Wumbo,
141141
// Byte 3
142142
ShutdownAnySegwit,
143143
// Byte 4
@@ -169,7 +169,7 @@ mod sealed {
169169
// Byte 1
170170
,
171171
// Byte 2
172-
BasicMPP,
172+
BasicMPP | Wumbo,
173173
// Byte 3
174174
ShutdownAnySegwit,
175175
// Byte 4
@@ -390,6 +390,9 @@ mod sealed {
390390
define_feature!(17, BasicMPP, [InitContext, NodeContext, InvoiceContext],
391391
"Feature flags for `basic_mpp`.", set_basic_mpp_optional, set_basic_mpp_required,
392392
supports_basic_mpp, requires_basic_mpp);
393+
define_feature!(19, Wumbo, [InitContext, NodeContext],
394+
"Feature flags for `option_support_large_channel` (aka wumbo channels).", set_wumbo_optional, set_wumbo_required,
395+
supports_wumbo, requires_wumbo);
393396
define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext],
394397
"Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional,
395398
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit);
@@ -843,6 +846,11 @@ mod tests {
843846
assert!(!InitFeatures::known().requires_scid_privacy());
844847
assert!(!NodeFeatures::known().requires_scid_privacy());
845848

849+
assert!(InitFeatures::known().supports_wumbo());
850+
assert!(NodeFeatures::known().supports_wumbo());
851+
assert!(!InitFeatures::known().requires_wumbo());
852+
assert!(!NodeFeatures::known().requires_wumbo());
853+
846854
let mut init_features = InitFeatures::known();
847855
assert!(init_features.initial_routing_sync());
848856
init_features.clear_initial_routing_sync();
@@ -878,14 +886,14 @@ mod tests {
878886
// Check that the flags are as expected:
879887
// - option_data_loss_protect
880888
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
881-
// - basic_mpp
889+
// - basic_mpp | wumbo
882890
// - opt_shutdown_anysegwit
883891
// -
884892
// - option_channel_type | option_scid_alias
885893
assert_eq!(node_features.flags.len(), 6);
886894
assert_eq!(node_features.flags[0], 0b00000010);
887895
assert_eq!(node_features.flags[1], 0b01010001);
888-
assert_eq!(node_features.flags[2], 0b00000010);
896+
assert_eq!(node_features.flags[2], 0b00001010);
889897
assert_eq!(node_features.flags[3], 0b00001000);
890898
assert_eq!(node_features.flags[4], 0b00000000);
891899
assert_eq!(node_features.flags[5], 0b10100000);

0 commit comments

Comments
 (0)