@@ -5160,32 +5160,32 @@ where
5160
5160
}
5161
5161
5162
5162
for htlc in context.pending_inbound_htlcs.iter() {
5163
+ // We include LocalRemoved HTLCs here because we may still need to broadcast a commitment
5164
+ // transaction including this HTLC if it times out before they RAA.
5163
5165
remote_htlc_total_msat += htlc.amount_msat;
5164
5166
if htlc.amount_msat / 1000 >= real_dust_limit_success_sat {
5165
- // We include LocalRemoved HTLCs here because we may still need to broadcast a commitment
5166
- // transaction including this HTLC if it times out before they RAA.
5167
5167
nondust_htlc_count += 1;
5168
5168
}
5169
5169
}
5170
5170
5171
5171
for htlc in context.pending_outbound_htlcs.iter() {
5172
+ // We don't include AwaitingRemoteRevokeToRemove HTLCs because our next commitment
5173
+ // transaction won't be generated until they send us their next RAA, which will mean
5174
+ // dropping any HTLCs in this state.
5172
5175
if let OutboundHTLCState::LocalAnnounced { .. } | OutboundHTLCState::Committed | OutboundHTLCState::RemoteRemoved { .. } = htlc.state {
5173
5176
local_htlc_total_msat += htlc.amount_msat;
5174
5177
if htlc.amount_msat / 1000 >= real_dust_limit_timeout_sat {
5175
- // We don't include AwaitingRemoteRevokeToRemove HTLCs because our next commitment
5176
- // transaction won't be generated until they send us their next RAA, which will mean
5177
- // dropping any HTLCs in this state.
5178
5178
nondust_htlc_count += 1;
5179
5179
}
5180
5180
}
5181
5181
}
5182
5182
5183
5183
for htlc in context.holding_cell_htlc_updates.iter() {
5184
+ // Don't include claims/fails that are awaiting ack, because once we get the
5185
+ // ack we're guaranteed to never include them in commitment txs anymore.
5184
5186
if let HTLCUpdateAwaitingACK::AddHTLC { amount_msat, .. } = htlc {
5185
5187
local_htlc_total_msat += amount_msat;
5186
5188
if amount_msat / 1000 >= real_dust_limit_timeout_sat {
5187
- // Don't include claims/fails that are awaiting ack, because once we get the
5188
- // ack we're guaranteed to never include them in commitment txs anymore.
5189
5189
nondust_htlc_count += 1;
5190
5190
}
5191
5191
}
@@ -5296,11 +5296,11 @@ where
5296
5296
}
5297
5297
5298
5298
for htlc in context.pending_outbound_htlcs.iter() {
5299
+ // We only include outbound HTLCs if it will not be included in their next commitment_signed,
5300
+ // i.e. if they've responded to us with an RAA after announcement.
5299
5301
if let OutboundHTLCState::Committed | OutboundHTLCState::RemoteRemoved {..} | OutboundHTLCState::LocalAnnounced { .. } = htlc.state {
5300
5302
local_htlc_total_msat += htlc.amount_msat;
5301
5303
if htlc.amount_msat / 1000 >= real_dust_limit_success_sat {
5302
- // We only include outbound HTLCs if it will not be included in their next commitment_signed,
5303
- // i.e. if they've responded to us with an RAA after announcement.
5304
5304
nondust_htlc_count += 1;
5305
5305
}
5306
5306
}
0 commit comments