Skip to content

Commit 369a2cf

Browse files
authored
Merge pull request #4529 from tankyleo/2026-04-add-max-inflight-knob-for-unannounced-channels
Add `unannounced_channel_max_inbound_htlc_value_in_flight_percentage`
2 parents 77a0e45 + 2867d5c commit 369a2cf

13 files changed

Lines changed: 288 additions & 101 deletions

lightning/src/ln/async_payments_tests.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,9 @@ fn often_offline_node_cfg() -> UserConfig {
504504
cfg.channel_handshake_config.announce_for_forwarding = false;
505505
cfg.channel_handshake_limits.force_announced_channel_preference = true;
506506
cfg.hold_outbound_htlcs_at_next_hop = true;
507+
// Use the setting that matches the default at the time these tests were written
508+
cfg.channel_handshake_config.unannounced_channel_max_inbound_htlc_value_in_flight_percentage =
509+
10;
507510
cfg
508511
}
509512

@@ -1310,6 +1313,10 @@ fn async_receive_mpp() {
13101313

13111314
let mut allow_priv_chan_fwds_cfg = test_default_channel_config();
13121315
allow_priv_chan_fwds_cfg.accept_forwards_to_priv_channels = true;
1316+
// Set the percentage to the default value at the time this test was written
1317+
allow_priv_chan_fwds_cfg
1318+
.channel_handshake_config
1319+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 10;
13131320

13141321
let node_chanmgrs = create_node_chanmgrs(
13151322
4,

lightning/src/ln/blinded_payment_tests.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ fn one_hop_blinded_path_with_dummy_hops() {
269269
fn mpp_to_one_hop_blinded_path() {
270270
let chanmon_cfgs = create_chanmon_cfgs(4);
271271
let node_cfgs = create_node_cfgs(4, &chanmon_cfgs);
272-
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &[None, None, None, None]);
272+
let mut config = test_default_channel_config();
273+
// Set the percentage to the default value at the time this test was written
274+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage = 10;
275+
let configs: [Option<UserConfig>; 4] = core::array::from_fn(|_| Some(config.clone()));
276+
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &configs);
273277
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
274278
let mut secp_ctx = Secp256k1::new();
275279

@@ -349,7 +353,11 @@ fn mpp_to_one_hop_blinded_path() {
349353
fn mpp_to_three_hop_blinded_paths() {
350354
let chanmon_cfgs = create_chanmon_cfgs(6);
351355
let node_cfgs = create_node_cfgs(6, &chanmon_cfgs);
352-
let node_chanmgrs = create_node_chanmgrs(6, &node_cfgs, &[None, None, None, None, None, None]);
356+
let mut config = test_default_channel_config();
357+
// Set the percentage to the default value at the time this test was written
358+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage = 10;
359+
let configs: [Option<UserConfig>; 6] = core::array::from_fn(|_| Some(config.clone()));
360+
let node_chanmgrs = create_node_chanmgrs(6, &node_cfgs, &configs);
353361
let nodes = create_network(6, &node_cfgs, &node_chanmgrs);
354362

355363
// Create this network topology so node 0 MPP's over 2 3-hop blinded paths:

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4656,6 +4656,7 @@ fn test_claim_to_closed_channel_blocks_claimed_event() {
46564656
#[test]
46574657
#[cfg(all(feature = "std", not(target_os = "windows")))]
46584658
fn test_single_channel_multiple_mpp() {
4659+
use crate::util::config::UserConfig;
46594660
use std::sync::atomic::{AtomicBool, Ordering};
46604661

46614662
// Test what happens when we attempt to claim an MPP with many parts that came to us through
@@ -4667,7 +4668,11 @@ fn test_single_channel_multiple_mpp() {
46674668
// for more info.
46684669
let chanmon_cfgs = create_chanmon_cfgs(9);
46694670
let node_cfgs = create_node_cfgs(9, &chanmon_cfgs);
4670-
let configs = [None, None, None, None, None, None, None, None, None];
4671+
let mut config = test_default_channel_config();
4672+
// Set the percentage to the default value at the time this test was written
4673+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage =
4674+
10;
4675+
let configs: [Option<UserConfig>; 9] = core::array::from_fn(|_| Some(config.clone()));
46714676
let node_chanmgrs = create_node_chanmgrs(9, &node_cfgs, &configs);
46724677
let mut nodes = create_network(9, &node_cfgs, &node_chanmgrs);
46734678

lightning/src/ln/channel.rs

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4102,6 +4102,7 @@ impl<SP: SignerProvider> ChannelContext<SP> {
41024102
),
41034103
holder_max_htlc_value_in_flight_msat: get_holder_max_htlc_value_in_flight_msat(
41044104
channel_value_satoshis,
4105+
announce_for_forwarding,
41054106
&config.channel_handshake_config,
41064107
),
41074108
counterparty_htlc_minimum_msat: open_channel_fields.htlc_minimum_msat,
@@ -4405,6 +4406,7 @@ impl<SP: SignerProvider> ChannelContext<SP> {
44054406
// receive `accept_channel2`.
44064407
holder_max_htlc_value_in_flight_msat: get_holder_max_htlc_value_in_flight_msat(
44074408
channel_value_satoshis,
4409+
config.channel_handshake_config.announce_for_forwarding,
44084410
&config.channel_handshake_config,
44094411
),
44104412
counterparty_htlc_minimum_msat: 0,
@@ -6678,24 +6680,41 @@ impl<SP: SignerProvider> ChannelContext<SP> {
66786680

66796681
/// Returns the value to use for `holder_max_htlc_value_in_flight_msat` as a percentage of the
66806682
/// `channel_value_satoshis` in msat, set through
6681-
/// [`ChannelHandshakeConfig::max_inbound_htlc_value_in_flight_percent_of_channel`]
6683+
/// [`ChannelHandshakeConfig::announced_channel_max_inbound_htlc_value_in_flight_percentage`]
6684+
/// or [`ChannelHandshakeConfig::unannounced_channel_max_inbound_htlc_value_in_flight_percentage`]
6685+
/// depending on the value of [`ChannelHandshakeConfig::announce_for_forwarding`].
66826686
///
66836687
/// The effective percentage is lower bounded by 1% and upper bounded by 100%.
66846688
///
6685-
/// [`ChannelHandshakeConfig::max_inbound_htlc_value_in_flight_percent_of_channel`]: crate::util::config::ChannelHandshakeConfig::max_inbound_htlc_value_in_flight_percent_of_channel
6689+
/// [`ChannelHandshakeConfig::announced_channel_max_inbound_htlc_value_in_flight_percentage`]: crate::util::config::ChannelHandshakeConfig::announced_channel_max_inbound_htlc_value_in_flight_percentage
6690+
/// [`ChannelHandshakeConfig::unannounced_channel_max_inbound_htlc_value_in_flight_percentage`]: crate::util::config::ChannelHandshakeConfig::unannounced_channel_max_inbound_htlc_value_in_flight_percentage
6691+
/// [`ChannelHandshakeConfig::announce_for_forwarding`]: crate::util::config::ChannelHandshakeConfig::announce_for_forwarding
66866692
fn get_holder_max_htlc_value_in_flight_msat(
6687-
channel_value_satoshis: u64, config: &ChannelHandshakeConfig,
6693+
channel_value_satoshis: u64, is_announced_channel: bool, config: &ChannelHandshakeConfig,
66886694
) -> u64 {
6689-
let configured_percent = if config.max_inbound_htlc_value_in_flight_percent_of_channel < 1 {
6695+
let config_setting = if is_announced_channel {
6696+
config.announced_channel_max_inbound_htlc_value_in_flight_percentage
6697+
} else {
6698+
config.unannounced_channel_max_inbound_htlc_value_in_flight_percentage
6699+
};
6700+
let configured_percent = if config_setting < 1 {
66906701
1
6691-
} else if config.max_inbound_htlc_value_in_flight_percent_of_channel > 100 {
6702+
} else if config_setting > 100 {
66926703
100
66936704
} else {
6694-
config.max_inbound_htlc_value_in_flight_percent_of_channel as u64
6705+
config_setting as u64
66956706
};
66966707
channel_value_satoshis * 10 * configured_percent
66976708
}
66986709

6710+
/// This is for legacy reasons, present for forward-compatibility.
6711+
/// LDK versions older than 0.0.104 don't know how read/handle values other than the legacy
6712+
/// percentage from storage. Hence, we use this function to not persist legacy values of
6713+
/// `holder_max_htlc_value_in_flight_msat` for channels into storage.
6714+
fn get_legacy_default_holder_max_htlc_value_in_flight_msat(channel_value_satoshis: u64) -> u64 {
6715+
channel_value_satoshis * 10 * MAX_IN_FLIGHT_PERCENT_LEGACY as u64
6716+
}
6717+
66996718
/// Returns a minimum channel reserve value the remote needs to maintain,
67006719
/// required by us according to the configured or default
67016720
/// [`ChannelHandshakeConfig::their_channel_reserve_proportional_millionths`]
@@ -15698,15 +15717,11 @@ impl<SP: SignerProvider> Writeable for FundedChannel<SP> {
1569815717
None
1569915718
};
1570015719

15701-
let mut old_max_in_flight_percent_config = UserConfig::default().channel_handshake_config;
15702-
old_max_in_flight_percent_config.max_inbound_htlc_value_in_flight_percent_of_channel =
15703-
MAX_IN_FLIGHT_PERCENT_LEGACY;
15704-
let max_in_flight_msat = get_holder_max_htlc_value_in_flight_msat(
15720+
let legacy_max_in_flight_msat = get_legacy_default_holder_max_htlc_value_in_flight_msat(
1570515721
self.funding.get_value_satoshis(),
15706-
&old_max_in_flight_percent_config,
1570715722
);
1570815723
let serialized_holder_htlc_max_in_flight =
15709-
if self.context.holder_max_htlc_value_in_flight_msat != max_in_flight_msat {
15724+
if self.context.holder_max_htlc_value_in_flight_msat != legacy_max_in_flight_msat {
1571015725
Some(self.context.holder_max_htlc_value_in_flight_msat)
1571115726
} else {
1571215727
None
@@ -16138,11 +16153,9 @@ impl<'a, 'b, 'c, ES: EntropySource, SP: SignerProvider>
1613816153
let mut holder_selected_channel_reserve_satoshis = Some(
1613916154
get_legacy_default_holder_selected_channel_reserve_satoshis(channel_value_satoshis),
1614016155
);
16156+
1614116157
let mut holder_max_htlc_value_in_flight_msat =
16142-
Some(get_holder_max_htlc_value_in_flight_msat(
16143-
channel_value_satoshis,
16144-
&UserConfig::default().channel_handshake_config,
16145-
));
16158+
Some(get_legacy_default_holder_max_htlc_value_in_flight_msat(channel_value_satoshis));
1614616159
// Prior to supporting channel type negotiation, all of our channels were static_remotekey
1614716160
// only, so we default to that if none was written.
1614816161
let mut channel_type = Some(ChannelTypeFeatures::only_static_remote_key());
@@ -17148,8 +17161,13 @@ mod tests {
1714817161
}
1714917162

1715017163
#[test]
17151-
#[rustfmt::skip]
1715217164
fn test_configured_holder_max_htlc_value_in_flight() {
17165+
do_test_configured_holder_max_htlc_value_in_flight(true);
17166+
do_test_configured_holder_max_htlc_value_in_flight(false);
17167+
}
17168+
17169+
#[rustfmt::skip]
17170+
fn do_test_configured_holder_max_htlc_value_in_flight(announce_channel: bool) {
1715317171
let test_est = TestFeeEstimator::new(15000);
1715417172
let feeest = LowerBoundedFeeEstimator::new(&test_est);
1715517173
let logger = TestLogger::new();
@@ -17161,13 +17179,49 @@ mod tests {
1716117179
let inbound_node_id = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[7; 32]).unwrap());
1716217180

1716317181
let mut config_2_percent = UserConfig::default();
17164-
config_2_percent.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 2;
17182+
config_2_percent.channel_handshake_config.announce_for_forwarding = announce_channel;
17183+
if announce_channel {
17184+
config_2_percent
17185+
.channel_handshake_config
17186+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 2;
17187+
} else {
17188+
config_2_percent
17189+
.channel_handshake_config
17190+
.unannounced_channel_max_inbound_htlc_value_in_flight_percentage = 2;
17191+
}
1716517192
let mut config_99_percent = UserConfig::default();
17166-
config_99_percent.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 99;
17193+
config_99_percent.channel_handshake_config.announce_for_forwarding = announce_channel;
17194+
if announce_channel {
17195+
config_99_percent
17196+
.channel_handshake_config
17197+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 99;
17198+
} else {
17199+
config_99_percent
17200+
.channel_handshake_config
17201+
.unannounced_channel_max_inbound_htlc_value_in_flight_percentage = 99;
17202+
}
1716717203
let mut config_0_percent = UserConfig::default();
17168-
config_0_percent.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 0;
17204+
config_0_percent.channel_handshake_config.announce_for_forwarding = announce_channel;
17205+
if announce_channel {
17206+
config_0_percent
17207+
.channel_handshake_config
17208+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 0;
17209+
} else {
17210+
config_0_percent
17211+
.channel_handshake_config
17212+
.unannounced_channel_max_inbound_htlc_value_in_flight_percentage = 0;
17213+
}
1716917214
let mut config_101_percent = UserConfig::default();
17170-
config_101_percent.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 101;
17215+
config_101_percent.channel_handshake_config.announce_for_forwarding = announce_channel;
17216+
if announce_channel {
17217+
config_101_percent
17218+
.channel_handshake_config
17219+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 101;
17220+
} else {
17221+
config_101_percent
17222+
.channel_handshake_config
17223+
.unannounced_channel_max_inbound_htlc_value_in_flight_percentage = 101;
17224+
}
1717117225

1717217226
// Test that `OutboundV1Channel::new` creates a channel with the correct value for
1717317227
// `holder_max_htlc_value_in_flight_msat`, when configured with a valid percentage value,
@@ -17196,26 +17250,26 @@ mod tests {
1719617250
assert_eq!(chan_4.context.holder_max_htlc_value_in_flight_msat, (chan_4_value_msat as f64 * 0.99) as u64);
1719717251

1719817252
// Test that `OutboundV1Channel::new` uses the lower bound of the configurable percentage values (1%)
17199-
// if `max_inbound_htlc_value_in_flight_percent_of_channel` is set to a value less than 1.
17253+
// if `(un)announced_channel_max_inbound_htlc_value_in_flight_percentage` is set to a value less than 1.
1720017254
let chan_5 = OutboundV1Channel::<&TestKeysInterface>::new(&feeest, &&keys_provider, &&keys_provider, outbound_node_id, &channelmanager::provided_init_features(&config_0_percent), 10000000, 100000, 42, &config_0_percent, 0, 42, None, &logger, None).unwrap();
1720117255
let chan_5_value_msat = chan_5.funding.get_value_satoshis() * 1000;
1720217256
assert_eq!(chan_5.context.holder_max_htlc_value_in_flight_msat, (chan_5_value_msat as f64 * 0.01) as u64);
1720317257

1720417258
// Test that `OutboundV1Channel::new` uses the upper bound of the configurable percentage values
17205-
// (100%) if `max_inbound_htlc_value_in_flight_percent_of_channel` is set to a larger value
17259+
// (100%) if `(un)announced_channel_max_inbound_htlc_value_in_flight_percentage` is set to a larger value
1720617260
// than 100.
1720717261
let chan_6 = OutboundV1Channel::<&TestKeysInterface>::new(&feeest, &&keys_provider, &&keys_provider, outbound_node_id, &channelmanager::provided_init_features(&config_101_percent), 10000000, 100000, 42, &config_101_percent, 0, 42, None, &logger, None).unwrap();
1720817262
let chan_6_value_msat = chan_6.funding.get_value_satoshis() * 1000;
1720917263
assert_eq!(chan_6.context.holder_max_htlc_value_in_flight_msat, chan_6_value_msat);
1721017264

1721117265
// Test that `InboundV1Channel::new` uses the lower bound of the configurable percentage values (1%)
17212-
// if `max_inbound_htlc_value_in_flight_percent_of_channel` is set to a value less than 1.
17266+
// if `(un)announced_channel_max_inbound_htlc_value_in_flight_percentage` is set to a value less than 1.
1721317267
let chan_7 = InboundV1Channel::<&TestKeysInterface>::new(&feeest, &&keys_provider, &&keys_provider, inbound_node_id, &channelmanager::provided_channel_type_features(&config_0_percent), &channelmanager::provided_init_features(&config_0_percent), &chan_1_open_channel_msg, 7, &config_0_percent, 0, &&logger, None).unwrap();
1721417268
let chan_7_value_msat = chan_7.funding.get_value_satoshis() * 1000;
1721517269
assert_eq!(chan_7.context.holder_max_htlc_value_in_flight_msat, (chan_7_value_msat as f64 * 0.01) as u64);
1721617270

1721717271
// Test that `InboundV1Channel::new` uses the upper bound of the configurable percentage values
17218-
// (100%) if `max_inbound_htlc_value_in_flight_percent_of_channel` is set to a larger value
17272+
// (100%) if `(un)announced_channel_max_inbound_htlc_value_in_flight_percentage` is set to a larger value
1721917273
// than 100.
1722017274
let chan_8 = InboundV1Channel::<&TestKeysInterface>::new(&feeest, &&keys_provider, &&keys_provider, inbound_node_id, &channelmanager::provided_channel_type_features(&config_101_percent), &channelmanager::provided_init_features(&config_101_percent), &chan_1_open_channel_msg, 7, &config_101_percent, 0, &&logger, None).unwrap();
1722117275
let chan_8_value_msat = chan_8.funding.get_value_satoshis() * 1000;

lightning/src/ln/channel_open_tests.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ fn test_inbound_anchors_manual_acceptance() {
182182
fn test_inbound_anchors_config_overridden() {
183183
let overrides = ChannelConfigOverrides {
184184
handshake_overrides: Some(ChannelHandshakeConfigUpdate {
185-
max_inbound_htlc_value_in_flight_percent_of_channel: Some(5),
185+
announced_channel_max_inbound_htlc_value_in_flight_percentage: Some(5),
186+
unannounced_channel_max_inbound_htlc_value_in_flight_percentage: None,
186187
htlc_minimum_msat: Some(1000),
187188
minimum_depth: Some(2),
188189
to_self_delay: Some(200),
@@ -1070,7 +1071,8 @@ pub fn test_accept_inbound_channel_config_override() {
10701071

10711072
let config_overrides = ChannelConfigOverrides {
10721073
handshake_overrides: Some(ChannelHandshakeConfigUpdate {
1073-
max_inbound_htlc_value_in_flight_percent_of_channel: None,
1074+
announced_channel_max_inbound_htlc_value_in_flight_percentage: None,
1075+
unannounced_channel_max_inbound_htlc_value_in_flight_percentage: None,
10741076
htlc_minimum_msat: None,
10751077
minimum_depth: None,
10761078
to_self_delay: None,

lightning/src/ln/functional_tests.rs

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6903,22 +6903,22 @@ pub fn test_channel_update_has_correct_htlc_maximum_msat() {
69036903
config_30_percent.channel_handshake_config.announce_for_forwarding = true;
69046904
config_30_percent
69056905
.channel_handshake_config
6906-
.max_inbound_htlc_value_in_flight_percent_of_channel = 30;
6906+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 30;
69076907
let mut config_50_percent = UserConfig::default();
69086908
config_50_percent.channel_handshake_config.announce_for_forwarding = true;
69096909
config_50_percent
69106910
.channel_handshake_config
6911-
.max_inbound_htlc_value_in_flight_percent_of_channel = 50;
6911+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 50;
69126912
let mut config_95_percent = UserConfig::default();
69136913
config_95_percent.channel_handshake_config.announce_for_forwarding = true;
69146914
config_95_percent
69156915
.channel_handshake_config
6916-
.max_inbound_htlc_value_in_flight_percent_of_channel = 95;
6916+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 95;
69176917
let mut config_100_percent = UserConfig::default();
69186918
config_100_percent.channel_handshake_config.announce_for_forwarding = true;
69196919
config_100_percent
69206920
.channel_handshake_config
6921-
.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
6921+
.announced_channel_max_inbound_htlc_value_in_flight_percentage = 100;
69226922

69236923
let chanmon_cfgs = create_chanmon_cfgs(4);
69246924
let node_cfgs = create_node_cfgs(4, &chanmon_cfgs);
@@ -8436,7 +8436,12 @@ pub fn test_inconsistent_mpp_params() {
84368436
// such HTLC and allow the second to stay.
84378437
let chanmon_cfgs = create_chanmon_cfgs(4);
84388438
let node_cfgs = create_node_cfgs(4, &chanmon_cfgs);
8439-
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &[None, None, None, None]);
8439+
let mut config = test_default_channel_config();
8440+
// Set the percentage to the default value at the time this test was written
8441+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage =
8442+
10;
8443+
let configs: [Option<UserConfig>; 4] = core::array::from_fn(|_| Some(config.clone()));
8444+
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &configs);
84408445
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
84418446

84428447
let node_a_id = nodes[0].node.get_our_node_id();
@@ -8580,7 +8585,12 @@ pub fn test_double_partial_claim() {
85808585
// amount.
85818586
let chanmon_cfgs = create_chanmon_cfgs(4);
85828587
let node_cfgs = create_node_cfgs(4, &chanmon_cfgs);
8583-
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &[None, None, None, None]);
8588+
let mut config = test_default_channel_config();
8589+
// Set the percentage to the default value at the time this test was written
8590+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage =
8591+
10;
8592+
let configs: [Option<UserConfig>; 4] = core::array::from_fn(|_| Some(config.clone()));
8593+
let node_chanmgrs = create_node_chanmgrs(4, &node_cfgs, &configs);
85848594
let nodes = create_network(4, &node_cfgs, &node_chanmgrs);
85858595

85868596
let node_b_id = nodes[1].node.get_our_node_id();
@@ -9067,7 +9077,8 @@ pub fn test_nondust_htlc_excess_fees_are_dust() {
90679077
config.channel_handshake_limits.min_max_accepted_htlcs = chan_utils::max_htlcs(&chan_ty);
90689078
config.channel_handshake_config.our_max_accepted_htlcs = chan_utils::max_htlcs(&chan_ty);
90699079
config.channel_handshake_config.our_htlc_minimum_msat = 1;
9070-
config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
9080+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage =
9081+
100;
90719082

90729083
let node_chanmgrs = create_node_chanmgrs(
90739084
3,
@@ -10039,7 +10050,8 @@ pub fn test_dust_exposure_holding_cell_assertion() {
1003910050
// Use a fixed dust exposure limit to make the test simpler
1004010051
const DUST_HTLC_VALUE_MSAT: u64 = 500_000;
1004110052
config.channel_config.max_dust_htlc_exposure = MaxDustHTLCExposure::FixedLimitMsat(5_000_000);
10042-
config.channel_handshake_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
10053+
config.channel_handshake_config.announced_channel_max_inbound_htlc_value_in_flight_percentage =
10054+
100;
1004310055

1004410056
let configs = [Some(config.clone()), Some(config.clone()), Some(config.clone())];
1004510057
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &configs);

0 commit comments

Comments
 (0)