File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2774,8 +2774,8 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
2774
2774
2775
2775
let on_holder_dust_htlc_exposure_msat = inbound_stats. on_holder_tx_dust_exposure_msat + outbound_stats. on_holder_tx_dust_exposure_msat ;
2776
2776
if on_holder_dust_htlc_exposure_msat as i64 + htlc_timeout_dust_limit as i64 * 1000 - 1 > self . get_max_dust_htlc_exposure_msat ( ) as i64 {
2777
- remaining_msat_below_dust_exposure_limit = Some ( cmp:: max (
2778
- remaining_msat_below_dust_exposure_limit. unwrap_or ( 0 ) ,
2777
+ remaining_msat_below_dust_exposure_limit = Some ( cmp:: min (
2778
+ remaining_msat_below_dust_exposure_limit. unwrap_or ( u64 :: max_value ( ) ) ,
2779
2779
self . get_max_dust_htlc_exposure_msat ( ) . saturating_sub ( on_holder_dust_htlc_exposure_msat) ) ) ;
2780
2780
dust_exposure_dust_limit_msat = cmp:: max ( dust_exposure_dust_limit_msat, htlc_timeout_dust_limit * 1000 ) ;
2781
2781
}
You can’t perform that action at this time.
0 commit comments