Skip to content

Commit a954fff

Browse files
committed
Update the docs for ClaimableOnChannelClose.transaction_fee_satoshis
In 85cc09e, we updated this member to include the sum of dust HTLCs on the commitment transaction, any elided anchors, as well as the sum of the msat amounts rounded down from non-dust HTLCs.
1 parent deadccf commit a954fff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,8 @@ pub enum Balance {
774774
amount_satoshis: u64,
775775
/// The transaction fee we pay for the closing commitment transaction. This amount is not
776776
/// included in the [`Balance::ClaimableOnChannelClose::amount_satoshis`] value.
777+
/// This amount includes the sum of dust HTLCs on the commitment transaction, any elided anchors,
778+
/// as well as the sum of msat amounts rounded down from non-dust HTLCs.
777779
///
778780
/// Note that if this channel is inbound (and thus our counterparty pays the commitment
779781
/// transaction fee) this value will be zero. For [`ChannelMonitor`]s created prior to LDK
@@ -2860,7 +2862,8 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
28602862
let to_self_value_sat = us.funding.current_holder_commitment_tx.to_broadcaster_value_sat();
28612863
res.push(Balance::ClaimableOnChannelClose {
28622864
amount_satoshis: to_self_value_sat + claimable_inbound_htlc_value_sat,
2863-
// In addition to `commit_tx_fee_sat`, this can also include dust HTLCs, and the total msat amount rounded down from non-dust HTLCs
2865+
// In addition to `commit_tx_fee_sat`, this can also include dust HTLCs, any elided anchors,
2866+
// and the total msat amount rounded down from non-dust HTLCs
28642867
transaction_fee_satoshis: if us.holder_pays_commitment_tx_fee.unwrap_or(true) {
28652868
let transaction = &us.funding.current_holder_commitment_tx.trust().built_transaction().transaction;
28662869
let output_value_sat: u64 = transaction.output.iter().map(|txout| txout.value.to_sat()).sum();

0 commit comments

Comments
 (0)