Skip to content

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

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
Bartok9:fix/bolt12-duplicate-fallback-terminal-errors
Sep 18, 2026
Merged

tnull merged 1 commit into
lightningdevkit:mainfrom
Bartok9:fix/bolt12-duplicate-fallback-terminal-errors

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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 2 times, most recently from d7d9eb9 to 283800b Compare September 16, 2026 12:47
…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 283800b to 3c98b1c Compare September 17, 2026 12:49
@tnull

tnull commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@tnull
tnull merged commit 43dcb60 into lightningdevkit:main Sep 18, 2026
27 of 48 checks passed
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.

3 participants