Commit 40eaa38
committed
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, the
invstring_used flag remained true, causing retry attempts to omit
the bolt11 parameter. Successful retries would then save to DB
without bolt11 annotation.
The bug is visible in payment_createonion_success() (line 1772):
flag is set before sendonion RPC completes. If sendonion fails
immediately (e.g., no peer connection), flag remains true and
retries omit bolt11.
Fix: Reset invstring_used=false in payment_rpc_failure() when
method is "sendonion", ensuring retry attempts include bolt11.1 parent 0cabd46 commit 40eaa38
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
224 | 229 | | |
225 | 230 | | |
226 | 231 | | |
| |||
0 commit comments