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

Merge PR 'Handle claim replay for payments which reused a payment hash' (#5541)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Handle claim replay for payments which reused a payment hash' (#5541)

from 2026-11-reused-payment-claim-replay into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5541
Reviewed-by: Val Wallace <val@noreply.git.rust-bitcoin.org>
✓ 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 bug in the Lightning Dev Kit where the node could confuse two different payments that reused the same payment hash. Previously, completing an old multi-part payment could incorrectly trigger a 'payment received' event for a newer payment, or a restart could fail to replay all owed 'payment received' events. The fix tags each completion action with the payment's unique internal ID so events are only generated for the correct payment.

Recommended action

Review and merge if not already merged; ensure downstream users upgrade to avoid payment-accounting inconsistencies when payment hashes are reused. No immediate emergency response is indicated, but correctness of payment events is critical for wallets and accounting.

Security signals we found

01

Payment hash reuse could cause incorrect PaymentClaimed event generation

02

Monitor update completion action now scoped by payment_id to prevent cross-payment confusion

03

Claim replay on startup could omit or misattribute events before this fix

04

Stale partially-claimable MPP state could remain after claim replay, allowing duplicate PaymentClaimable

Risk score

Why this scored 58/100

Our methodology →
Potential impact 18/30
Exploitability 10/25
Stealth signal 8/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/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.