Skip to content

Commit 061a725

Browse files
committed
Include HTLCs unknown by remote in can_accept_incoming_htlc stats
While these HTLCs may currently be unknown to our counterparty, they can end up in commitments soon. Moreover, we are considering failing a single HTLC here, not the entire channel, so we opt to be conservative in what we accept to forward.
1 parent 63abd10 commit 061a725

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5026,9 +5026,11 @@ where
50265026
// doesn't exist on the receiver's side, only on the sender's.
50275027
let fee_spike_buffer_htlc =
50285028
if funding.get_channel_type().supports_anchor_zero_fee_commitments() { 0 } else { 1 };
5029-
// Do not include outbound update_add_htlc's in the holding cell, or those which haven't yet been ACK'ed
5030-
// by the counterparty (ie. LocalAnnounced HTLCs)
5031-
let include_counterparty_unknown_htlcs = false;
5029+
// While these HTLCs may currently be unknown to our counterparty, they can
5030+
// end up in commitments soon. Moreover, we are considering failing a
5031+
// single HTLC here, not the entire channel, so we opt to be conservative
5032+
// in what we accept to forward.
5033+
let include_counterparty_unknown_htlcs = true;
50325034
// A `None` `HTLCCandidate` is used as in this case because we're already accounting for
50335035
// the incoming HTLC as it has been fully committed by both sides.
50345036
let next_local_commitment_stats = self

0 commit comments

Comments
 (0)