+pub fn test_default_channel_config() -> UserConfig {
+ let mut default_config = UserConfig::default();
+ // Set cltv_expiry_delta slightly lower to keep the final CLTV values inside one byte in our
+ // tests so that our script-length checks don't fail (see ACCEPTED_HTLC_SCRIPT_WEIGHT).
+ default_config.channel_options.cltv_expiry_delta = 6*6;
+ default_config.channel_options.announced_channel = true;
+ default_config.peer_channel_config_limits.force_announced_channel_preference = false;
+ // When most of our tests were written, the default HTLC minimum was fixed at 1000.
+ // It now defaults to 1, so we simply set it to the expected value here.
+ default_config.own_channel_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_options.max_dust_htlc_exposure_msat = 50_000_000;
+ default_config
+}
+