Use multiplier in dust exposure threshold calculation
[rust-lightning] / lightning / src / ln / functional_test_utils.rs
index 533bdee2ab7389e5a04266b09cd66b5bcca77618..4271794d0aadcbb2799c765fa40c10d7b4913b32 100644 (file)
@@ -2572,8 +2572,10 @@ pub fn test_default_channel_config() -> UserConfig {
        // It now defaults to 1, so we simply set it to the expected value here.
        default_config.channel_handshake_config.our_htlc_minimum_msat = 1000;
        // When most of our tests were written, we didn't have the notion of a `max_dust_htlc_exposure_msat`,
-       // It now defaults to 5_000_000 msat; to avoid interfering with tests we bump it to 50_000_000 msat.
-       default_config.channel_config.max_dust_htlc_exposure = MaxDustHTLCExposure::FixedLimitMsat(50_000_000);
+       // to avoid interfering with tests we bump it to 50_000_000 msat (assuming the default test
+       // feerate of 253).
+       default_config.channel_config.max_dust_htlc_exposure =
+               MaxDustHTLCExposure::FeeRateMultiplier(50_000_000 / 253);
        default_config
 }