Skip to content

Reject BOLT11 invoices for another network - #1275

Open
Muneerali199 wants to merge 1 commit into
lightningdevkit:mainfrom
Muneerali199:fix/1271-bolt11-network-validation
Open

Muneerali199 wants to merge 1 commit into
lightningdevkit:mainfrom
Muneerali199:fix/1271-bolt11-network-validation

Conversation

@Muneerali199

Copy link
Copy Markdown

Fixes #1271.

Route the three outbound BOLT11 payment methods and both probe methods through the same running-state and network validation. A wrong-network invoice returns InvalidNetwork before route selection; matching invoices use the existing amount and routing logic.

An in-memory test checks the five entry points without starting nodes or connecting peers. cargo test --lib passed all 497 tests, and git diff --check passed.

AI assistance: OpenAI gpt-6.2-sol helped trace the outbound entry points, implement the check, and add and run the tests.

AI assistance: OpenAI gpt-6.2-sol helped update the outbound validation and add and run in-memory tests.

Signed-off-by: Muneerali199 <alimuneerali245@gmail.com>
@ldk-reviews-bot

ldk-reviews-bot commented Dec 6, 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.

@ldk-reviews-bot
ldk-reviews-bot requested a review from tnull December 6, 2026 14:54
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.

Bolt11Payment pays invoices issued for another network

2 participants