Commit a11b5e6
Fix BOLT11 annotation loss after sendonion failure
Fixes #6978 where bolt11 annotations were lost when sendonion failed early and payment was retried.
When sendonion RPC fails before saving payment to database, invstring_used flag would remain true, causing retry attempts to omit bolt11 parameter. Successful retries would then save to DB without bolt11 annotation.
Move invstring_used flag setting from payment_createonion_success to payment_sendonion_success. This ensures the flag is only set after sendonion actually succeeds. The bolt11 will be sent with every sendonion attempt until the first successful one, accepting the minor redundancy for cleaner state management.
Changelog-Fixed: Plugins: `listpays` can be missing the bolt11 information in some cases where `pay` is used.1 parent 0cabd46 commit a11b5e6
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1703 | 1703 | | |
1704 | 1704 | | |
1705 | 1705 | | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1706 | 1711 | | |
1707 | 1712 | | |
1708 | 1713 | | |
| |||
1765 | 1770 | | |
1766 | 1771 | | |
1767 | 1772 | | |
1768 | | - | |
1769 | | - | |
1770 | 1773 | | |
1771 | 1774 | | |
1772 | 1775 | | |
| |||
0 commit comments