Skip to content

tests: Add interoperability tests for BOLT12 (Offers) with CLN#905

Open
alexgrad42 wants to merge 1 commit into
lightningdevkit:mainfrom
alexgrad42:feature/add_bolt12_scenario_coverage_to_interop_tests
Open

tests: Add interoperability tests for BOLT12 (Offers) with CLN#905
alexgrad42 wants to merge 1 commit into
lightningdevkit:mainfrom
alexgrad42:feature/add_bolt12_scenario_coverage_to_interop_tests

Conversation

@alexgrad42
Copy link
Copy Markdown

Activates scenarios for BOLT12 offer payments between ldk-node and Core Lightning (CLN) inside integration tests

Fix #856

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented May 17, 2026

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 May 17, 2026 09:54
@alexgrad42 alexgrad42 force-pushed the feature/add_bolt12_scenario_coverage_to_interop_tests branch from d032015 to bf29202 Compare May 17, 2026 09:55
Activates scenarios for BOLT12 offer payments between
ldk-node and Core Lightning (CLN) inside integration tests

Fix lightningdevkit#856
@alexgrad42 alexgrad42 force-pushed the feature/add_bolt12_scenario_coverage_to_interop_tests branch from bf29202 to bd238f7 Compare May 17, 2026 10:22
Copy link
Copy Markdown
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this! Some comments.


/// Blocks execution until the channel with the specified peer becomes active (`is_usable == true`).
/// Maximum wait time is 15 seconds (30 attempts with a 500ms interval).
pub(crate) async fn wait_for_channel_usable(node: &Node, counterparty_node_id: PublicKey) {
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.

We shouldn't use this manual sleep, we have events for that.


/// Specialized version of `force_close_after_payment_scenario` for BOLT11 payments.
/// See [`force_close_after_payment_scenario`] for details.
pub(crate) async fn force_close_after_payment_bolt11_scenario<E: ElectrumApi>(
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.

I don't understand why we need all this additional boilerplate.

payment::send_bolt11_to_peer(node, peer, 5_000_000, "post-splice-bolt11").await;
},
PaymentProtocol::Bolt12 => {
// Wait for Onion Message router updates the channel to usable state.
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.

I don't think I understand what "Wait for Onion Message router updates the channel to usable state." means. Can you expand?


/// Specialized version of `splice_in_scenario` for BOLT11 payments.
/// See [`splice_in_scenario`] for details.
pub(crate) async fn splice_in_bolt11_scenario<E: ElectrumApi>(
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.

Please avoid adding helper methods that are less than 5 lines of code.

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.

Add BOLT12 scenario coverage to interop test harness

3 participants