Skip to content

Commit f0b3961

Browse files
committed
Set data_loss_protect_required
1 parent 20cd856 commit f0b3961

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lightning/src/ln/channelmanager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6684,7 +6684,7 @@ pub fn provided_init_features(_config: &UserConfig) -> InitFeatures {
66846684
// should also add the corresponding (optional) bit to the [`ChannelMessageHandler`] impl for
66856685
// [`ErroringMessageHandler`].
66866686
let mut features = InitFeatures::empty();
6687-
features.set_data_loss_protect_optional();
6687+
features.set_data_loss_protect_required();
66886688
features.set_upfront_shutdown_script_optional();
66896689
features.set_variable_length_onion_required();
66906690
features.set_static_remote_key_required();

lightning/src/ln/features.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ mod tests {
856856
// Set a bunch of features we use, plus initial_routing_sync_required (which shouldn't get
857857
// converted as it's only relevant in an init context).
858858
init_features.set_initial_routing_sync_required();
859-
init_features.set_data_loss_protect_optional();
859+
init_features.set_data_loss_protect_required();
860860
init_features.set_variable_length_onion_required();
861861
init_features.set_static_remote_key_required();
862862
init_features.set_payment_secret_required();
@@ -876,15 +876,15 @@ mod tests {
876876
let node_features: NodeFeatures = init_features.to_context();
877877
{
878878
// Check that the flags are as expected:
879-
// - option_data_loss_protect
879+
// - option_data_loss_protect (req)
880880
// - var_onion_optin (req) | static_remote_key (req) | payment_secret(req)
881881
// - basic_mpp | wumbo
882882
// - opt_shutdown_anysegwit
883883
// - onion_messages
884884
// - option_channel_type | option_scid_alias
885885
// - option_zeroconf
886886
assert_eq!(node_features.flags.len(), 7);
887-
assert_eq!(node_features.flags[0], 0b00000010);
887+
assert_eq!(node_features.flags[0], 0b00000001);
888888
assert_eq!(node_features.flags[1], 0b01010001);
889889
assert_eq!(node_features.flags[2], 0b10001010);
890890
assert_eq!(node_features.flags[3], 0b00001000);

0 commit comments

Comments
 (0)