From caceee05143b8948d254ca6d21e931217b38c89b Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Tue, 17 Nov 2026 11:57:50 +0100 Subject: [PATCH] Fund BOLT12 LSPS2 test service per JIT channel The BOLT12 LSPS2 integration test has failed consistently since it landed together with the funding-input locks. Its service holds a single coin but opens three JIT channels without mining or syncing in between. A funding transaction's inputs stay locked until the wallet sees it confirm, and the wallet learns of its change only from a sync, so the service has no coin left for the second JIT channel. Fund the service with one coin per JIT channel, mirroring how the BOLT11 LSPS2 integration test was adapted for the same locks. The locks themselves are correct: without them, the service would have double-spent the same coin across the funding transactions. Co-Authored-By: HAL 9000 --- tests/integration_tests_rust.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests_rust.rs b/tests/integration_tests_rust.rs index 02082881ff..acbbb6cb64 100644 --- a/tests/integration_tests_rust.rs +++ b/tests/integration_tests_rust.rs @@ -7491,13 +7491,18 @@ async fn bolt12_lsps2_client_service_integration() { let client_addr = client_node.listening_addresses().unwrap().first().unwrap().clone(); payer_node.connect(client_node.node_id(), client_addr, false).unwrap(); - let service_onchain_addr = service_node.onchain_payment().new_address().unwrap(); + // The service opens three JIT channels below without mining or syncing in between. Each + // needs a coin of its own: a funding transaction's inputs stay locked until the wallet sees + // it confirm, and the wallet learns of its change only from a sync. + let mut funded_addrs: Vec<_> = + (0..3).map(|_| service_node.onchain_payment().new_address().unwrap()).collect(); let client_onchain_addr = client_node.onchain_payment().new_address().unwrap(); let payer_onchain_addr = payer_node.onchain_payment().new_address().unwrap(); + funded_addrs.extend([client_onchain_addr, payer_onchain_addr]); premine_and_distribute_funds( &bitcoind.client, &electrsd.client, - vec![service_onchain_addr, client_onchain_addr, payer_onchain_addr], + funded_addrs, Amount::from_sat(10_000_000), ) .await;