Skip to content

Commit 68d1382

Browse files
committed
f anchor panic
1 parent f51e0c0 commit 68d1382

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,14 +2766,14 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
27662766
self.holder_dust_limit_satoshis + dust_buffer_feerate * htlc_timeout_tx_weight(false) / 1000)
27672767
};
27682768
let on_counterparty_dust_htlc_exposure_msat = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
2769-
if on_counterparty_dust_htlc_exposure_msat + htlc_success_dust_limit * 1000 - 1 > self.get_max_dust_htlc_exposure_msat() {
2769+
if on_counterparty_dust_htlc_exposure_msat as i64 + htlc_success_dust_limit as i64 * 1000 - 1 > self.get_max_dust_htlc_exposure_msat() as i64 {
27702770
remaining_msat_below_dust_exposure_limit =
27712771
Some(self.get_max_dust_htlc_exposure_msat().saturating_sub(on_counterparty_dust_htlc_exposure_msat));
27722772
dust_exposure_dust_limit_msat = cmp::max(dust_exposure_dust_limit_msat, htlc_success_dust_limit * 1000);
27732773
}
27742774

27752775
let on_holder_dust_htlc_exposure_msat = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
2776-
if on_holder_dust_htlc_exposure_msat + htlc_timeout_dust_limit * 1000 - 1 > self.get_max_dust_htlc_exposure_msat() {
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 {
27772777
remaining_msat_below_dust_exposure_limit = Some(cmp::max(
27782778
remaining_msat_below_dust_exposure_limit.unwrap_or(0),
27792779
self.get_max_dust_htlc_exposure_msat().saturating_sub(on_holder_dust_htlc_exposure_msat)));

0 commit comments

Comments
 (0)