You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstract dust-vs-nondust HTLC sorting away from channel
Move these decisions to `TxBuilder` when calculating total dust exposure
and total transaction fees.
We would have liked to delete
`TxBuilder::htlc_success_timeout_dust_limits`, but this is required in
`get_available_balances` to potentially clamp the balance to the dust
limit. Because this method is there, we also use it to determine
whether a single HTLC is dust or nondust (otherwise we would have used a
`TxBuilder::is_dust` call on that HTLC).
Along the way, we also sort non-dust HTLCs in the holding cell using
the exact proposed feerate in `can_send_update_fee`. When checking
whether we can afford the next commitment transaction fee, we should
not count HTLCs in the holding cell using the dust buffer feerate, as
this can trim HTLCs that will be non-dust on the next commitment
transaction. Rather we should use the exact proposed feerate; this
ensures we account for all non-dust HTLCs on the next commitment
transaction.
0 commit comments