Skip to content

Commit e1fa5eb

Browse files
Conditionally advertise htlc_hold feature
Now that we support the feature of sending payments as an often-offline sender to an often-offline recipient, including the sender's LSP-side, we can start conditionally advertising the feature bit to other nodes on the network.
1 parent a271381 commit e1fa5eb

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15058,7 +15058,6 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1505815058

1505915059
// If we are configured to be an announced node, we are expected to be always-online and can
1506015060
// advertise the htlc_hold feature.
15061-
#[cfg(test)]
1506215061
if config.enable_htlc_hold {
1506315062
features.set_htlc_hold_optional();
1506415063
}

lightning/src/util/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,6 @@ pub struct UserConfig {
945945
/// Setting this to `true` may break backwards compatibility with LDK versions < 0.2.
946946
///
947947
/// Default value: `false`
948-
#[cfg(test)]
949948
pub enable_htlc_hold: bool,
950949
/// If this is set to true, then if we as an often-offline payer receive a [`StaticInvoice`] to
951950
/// pay, we will attempt to hold the corresponding outbound HTLCs with our next-hop channel
@@ -973,7 +972,6 @@ impl Default for UserConfig {
973972
accept_intercept_htlcs: false,
974973
manually_handle_bolt12_invoices: false,
975974
enable_dual_funded_channels: false,
976-
#[cfg(test)]
977975
enable_htlc_hold: false,
978976
hold_outbound_htlcs_at_next_hop: true,
979977
}
@@ -997,6 +995,7 @@ impl Readable for UserConfig {
997995
manually_handle_bolt12_invoices: Readable::read(reader)?,
998996
enable_dual_funded_channels: Readable::read(reader)?,
999997
hold_outbound_htlcs_at_next_hop: Readable::read(reader)?,
998+
enable_htlc_hold: Readable::read(reader)?,
1000999
})
10011000
}
10021001
}

0 commit comments

Comments
 (0)