@@ -10300,13 +10300,13 @@ fn do_test_max_dust_htlc_exposure(dust_outbound_balance: bool, exposure_breach_e
1030010300 } else { 0 };
1030110301 let initial_feerate = if apply_excess_fee { 253 * 2 } else { 253 };
1030210302 let expected_dust_buffer_feerate = initial_feerate + 2530;
10303- let mut commitment_tx_cost = chan_utils::commit_tx_fee_msat(initial_feerate - 253, nondust_htlc_count_in_limit as usize, &ChannelTypeFeatures::empty());
10304- commitment_tx_cost +=
10303+ let mut commitment_tx_cost_msat = chan_utils::commit_tx_fee_msat(initial_feerate - 253, nondust_htlc_count_in_limit as usize, &ChannelTypeFeatures::empty());
10304+ commitment_tx_cost_msat +=
1030510305 if on_holder_tx {
1030610306 htlc_success_tx_weight(&ChannelTypeFeatures::empty())
1030710307 } else {
1030810308 htlc_timeout_tx_weight(&ChannelTypeFeatures::empty())
10309- } * (initial_feerate as u64 - 253) / 1000 * nondust_htlc_count_in_limit;
10309+ } * (initial_feerate as u64 - 253) * nondust_htlc_count_in_limit;
1031010310 {
1031110311 let mut feerate_lock = chanmon_cfgs[0].fee_estimator.sat_per_kw.lock().unwrap();
1031210312 *feerate_lock = initial_feerate;
@@ -10315,8 +10315,8 @@ fn do_test_max_dust_htlc_exposure(dust_outbound_balance: bool, exposure_breach_e
1031510315 // Default test fee estimator rate is 253 sat/kw, so we set the multiplier to 5_000_000 / 253
1031610316 // to get roughly the same initial value as the default setting when this test was
1031710317 // originally written.
10318- MaxDustHTLCExposure::FeeRateMultiplier((5_000_000 + commitment_tx_cost ) / 253)
10319- } else { MaxDustHTLCExposure::FixedLimitMsat(5_000_000 + commitment_tx_cost ) };
10318+ MaxDustHTLCExposure::FeeRateMultiplier((5_000_000 + commitment_tx_cost_msat ) / 253)
10319+ } else { MaxDustHTLCExposure::FixedLimitMsat(5_000_000 + commitment_tx_cost_msat ) };
1032010320 let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
1032110321 let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[Some(config), None]);
1032210322 let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
@@ -10461,7 +10461,7 @@ fn do_test_max_dust_htlc_exposure(dust_outbound_balance: bool, exposure_breach_e
1046110461 // Outbound dust balance: 5200 sats
1046210462 nodes[0].logger.assert_log("lightning::ln::channel",
1046310463 format!("Cannot accept value that would put our total dust exposure at {} over the limit {} on counterparty commitment tx",
10464- dust_htlc_on_counterparty_tx_msat * dust_htlc_on_counterparty_tx + commitment_tx_cost + 4,
10464+ dust_htlc_on_counterparty_tx_msat * dust_htlc_on_counterparty_tx + commitment_tx_cost_msat + 4,
1046510465 max_dust_htlc_exposure_msat), 1);
1046610466 }
1046710467 } else if exposure_breach_event == ExposureEvent::AtUpdateFeeOutbound {
0 commit comments