AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 30 Bitcoin

Fix BOLT11 annotation loss after sendonion failure

Public commit record

What the developer wrote

Authored by wqxoxo

81/100 · Strong
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.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bookkeeping bug in Core Lightning's payment plugin. When a user pays a BOLT11 invoice using the `pay` command, the plugin can retry the payment if the first attempt fails early. Previously, a flag was set too soon, causing retries to omit the original invoice string. If a retry then succeeded, the stored payment record would permanently lack the BOLT11 invoice information. The fix moves the flag so it is only set after `sendonion` succeeds, ensuring the invoice string is included on every retry attempt. This is a data-integrity/user-experience bug, not a security vulnerability.

Recommended action

Treat as a routine bug fix. No immediate security response required. Users relying on accurate `listpays` BOLT11 metadata should upgrade to a release containing this commit.

Security signals we found

01

State-management bug in payment retry logic

02

Loss of BOLT11 invoice metadata in persistent payment records

03

Fix is localized and conservative (minor redundancy accepted for cleaner state)

04

No evidence of malicious exploitation or memory-safety issues

Risk score

Why this scored 30/100

Our methodology →
Potential impact 8/30
Exploitability 0/25
Stealth signal 3/15
Affected reach 5/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.