Skip to content

Commit 993348b

Browse files
committed
f tmp variables
1 parent 3ed8098 commit 993348b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lightning/src/ln/channel.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -3126,13 +3126,15 @@ impl<Signer: Sign> Channel<Signer> {
31263126
if feerate_over_dust_buffer {
31273127
let inbound_stats = self.get_inbound_pending_htlc_stats();
31283128
let outbound_stats = self.get_outbound_pending_htlc_stats();
3129-
if inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat > self.get_max_dust_htlc_exposure_msat() {
3129+
let holder_tx_dust_exposure = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
3130+
let counterparty_tx_dust_exposure = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
3131+
if holder_tx_dust_exposure > self.get_max_dust_htlc_exposure_msat() {
31303132
return Err(ChannelError::Close(format!("Peer sent update_fee with a feerate ({}) which may over-expose us to dust-in-flight on our own transactions (totaling {} msat)",
3131-
msg.feerate_per_kw, inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat)));
3133+
msg.feerate_per_kw, holder_tx_dust_exposure)));
31323134
}
3133-
if inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat > self.get_max_dust_htlc_exposure_msat() {
3135+
if counterparty_tx_dust_exposure > self.get_max_dust_htlc_exposure_msat() {
31343136
return Err(ChannelError::Close(format!("Peer sent update_fee with a feerate ({}) which may over-expose us to dust-in-flight on our counterparty's transactions (totaling {} msat)",
3135-
msg.feerate_per_kw, inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat)));
3137+
msg.feerate_per_kw, counterparty_tx_dust_exposure)));
31363138
}
31373139
}
31383140
Ok(())

0 commit comments

Comments
 (0)