Skip to content

fix: BOLT12 arm of UnifiedPayment::send returns DuplicatePayment/PersistenceFailed errors - #1098

Open
Bartok9 wants to merge 1 commit into
lightningdevkit:mainfrom
Bartok9:fix/bolt12-duplicate-fallback-terminal-errors
Open

Bartok9 wants to merge 1 commit into
lightningdevkit:mainfrom
Bartok9:fix/bolt12-duplicate-fallback-terminal-errors

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 14, 2026

Copy link
Copy Markdown

BOLT12 arm of UnifiedPayment::send fell through to BOLT11/onchain on DuplicatePayment/PersistenceFailed — risks double payment. Mirrors BOLT11 fix (#1038).

Fixes #1060

AI-assisted: generated by Sera (Hermes Agent), verified manually.
Signed-off-by: Bartok9 259807879+Bartok9@users.noreply.github.com

@ldk-reviews-bot

ldk-reviews-bot commented Sep 14, 2026

Copy link
Copy Markdown

I've assigned @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@Bartok9
Bartok9 force-pushed the fix/bolt12-duplicate-fallback-terminal-errors branch from 00da525 to d7d9eb9 Compare September 15, 2026 10:55
…istenceFailed errors

The BOLT12 arm used .map_err() + if let Ok, so DuplicatePayment and
PersistenceFailed fell through to BOLT11/onchain — risking double payment.
Now treats both as terminal, mirroring the BOLT11 fix in lightningdevkit#1038.

Fixes: lightningdevkit#1060

AI-assisted: generated by Sera (Hermes Agent), verified manually.
Signed-off-by: Bartok9 <259807879+Bartok9@users.noreply.github.com>
@Bartok9
Bartok9 force-pushed the fix/bolt12-duplicate-fallback-terminal-errors branch from d7d9eb9 to 283800b Compare September 16, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants