Skip to content

Add python integration test for spontaneous keysend payments#923

Open
heyolaniran wants to merge 2 commits into
lightningdevkit:mainfrom
heyolaniran:feat/python_binding_test
Open

Add python integration test for spontaneous keysend payments#923
heyolaniran wants to merge 2 commits into
lightningdevkit:mainfrom
heyolaniran:feat/python_binding_test

Conversation

@heyolaniran

Copy link
Copy Markdown
Contributor

Hello @tnull x @enigbe x @Camillarhi This commit adds the test_spontaneous_payment method which :

  • sets up two nodes in regtest environment, funds them, and opens channel
  • Arbitrary sends a 2.5M msat keysend with a custom TLV record
  • Asserts PAYMENT_SUCCESSFUL / PAYMENT_RECEIVED events
  • verify payment details Shared helpers (_setup_two_nodes, _fund_nodes, _open_channel_and_wait_ready, _stop_and_cleanup) reduce duplication for future integration

Motivation

The python bindings has not coverage for send_with_custom_tlvs

Run the new test

  • uv run --group dev python -m unittest src.ldk_node.test_ldk_node.TestLdkNode.test_spontaneous_payment -v

this commit adds the test_spontaneous_payment method which :
- sets up two nodes in regtest environment, funds them, and opens channel
- Arbitrary sends a 2.5M msat keysend with a custom TLV record
- Asserts PAYMENT_SUCCESSFUL / PAYMENT_RECEIVED events
- verify payment details
Shared helpers (_setup_two_nodes, _fund_nodes, _open_channel_and_wait_ready,
_stop_and_cleanup) reduce duplication for future integration
@ldk-reviews-bot

ldk-reviews-bot commented Jun 5, 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 June 5, 2026 17:50
@ldk-reviews-bot

Copy link
Copy Markdown

🔔 1st Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@tnull tnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is currently not available, so we'll need to wait a bit. One comment for now

Comment thread bindings/python/src/ldk_node/test_ldk_node.py Outdated
@heyolaniran heyolaniran force-pushed the feat/python_binding_test branch from 0a308cb to 8056689 Compare June 8, 2026 18:31
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