Fix missing PaymentSent::fee_paid_msat#4651
Conversation
If an outbound payment was abandoned with htlcs in-flight and later claimed, we would previously have the PaymentSent::fee_paid_msat be set to None. This contradicted some docs on the event that stated the field would always be Some after 0.0.103.
|
I've assigned @tankyleo as a reviewer! |
| /// overstate the amount paid, though this is unlikely. | ||
| /// | ||
| /// This is only `None` for payments initiated on LDK versions prior to 0.0.103. | ||
| /// May be `None` for payments initiated on LDK versions prior to 0.4. |
There was a problem hiding this comment.
nit: This wording slightly overstates the scope. For payments that stayed in Retryable state (i.e., were never abandoned while in-flight), fee_paid_msat has been Some since 0.0.103. The None gap between 0.0.103 and 0.4 only applies to payments that were abandoned with HTLCs in-flight and then unexpectedly claimed.
Something like "May be None for payments abandoned on LDK versions prior to 0.4, or initiated prior to 0.0.103." would be more precise. Not blocking — the current "May be" phrasing is technically correct.
Review SummaryThe fix is correct. The core logic — preserving
The test assertion change from Inline comments posted:
No bugs found. |
If an outbound payment was abandoned with htlcs in-flight and later claimed, we would previously have the
PaymentSent::fee_paid_msatbe set toNone. This contradicted some docs on the event that stated the field would always beSomeafter 0.0.103.Fixes #4639