Skip to content

Commit 35dd3a8

Browse files
committed
Correct per_outbound_htlc_counterparty_commit_tx_fee_msat
We account for the fees of the htlc transaction only in case the channel does _not_ support zero fee htlc transactions.
1 parent b1fc7d8 commit 35dd3a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ pub(crate) fn per_outbound_htlc_counterparty_commit_tx_fee_msat(feerate_per_kw:
201201
// since the lowest denomination of bitcoin on-chain is the satoshi.
202202
let commitment_tx_fee = COMMITMENT_TX_WEIGHT_PER_HTLC * feerate_per_kw as u64 / 1000 * 1000;
203203
if channel_type_features.supports_anchors_zero_fee_htlc_tx() {
204-
commitment_tx_fee + htlc_success_tx_weight(channel_type_features) * feerate_per_kw as u64 / 1000
205-
} else {
206204
commitment_tx_fee
205+
} else {
206+
commitment_tx_fee + htlc_success_tx_weight(channel_type_features) * feerate_per_kw as u64 / 1000
207207
}
208208
}
209209

0 commit comments

Comments
 (0)