Skip to content

Commit 659dc39

Browse files
committed
fix(test): address code review findings
- Add wait_for_block_sync for CLN to prevent startup race conditions - Re-ignore CLN keysend: upstream LDK fix needed (payment_secret in keysend HTLCs) - Re-ignore Eclair splice: CI confirmed SplicePending timeout, likely LDK↔Eclair protocol mismatch - Keep Eclair keysend un-ignored: CI confirmed it passes with latest Eclair image
1 parent 04a6359 commit 659dc39

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

tests/common/cln.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,23 @@ impl ExternalNode for TestClnNode {
118118
Ok(info.blockheight as u64)
119119
}
120120

121+
async fn wait_for_block_sync(&self, min_height: u64) -> Result<(), TestFailure> {
122+
for i in 0..30 {
123+
let height = self.get_block_height().await?;
124+
if height >= min_height {
125+
return Ok(());
126+
}
127+
if i == 29 {
128+
return Err(self.make_error(format!(
129+
"CLN did not reach height {} (at {}) after 60s",
130+
min_height, height
131+
)));
132+
}
133+
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
134+
}
135+
Ok(())
136+
}
137+
121138
async fn connect_peer(
122139
&self, peer_id: PublicKey, addr: SocketAddress,
123140
) -> Result<(), TestFailure> {

tests/integration_tests_cln.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async fn test_cln_receive_payments() {
7676
/// Upstream LDK fix needed: skip payment_secret verification when a valid
7777
/// `keysend_preimage` TLV is present.
7878
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
79-
79+
#[ignore = "CLN v24.08+ sends payment_secret in keysend — LDK rejects (upstream LDK fix needed)"]
8080
async fn test_cln_receive_keysend() {
8181
let (bitcoind, electrs, cln) = setup_clients().await;
8282
let node = setup_ldk_node();

tests/integration_tests_eclair.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ async fn test_eclair_send_keysend() {
113113
node.stop().unwrap();
114114
}
115115

116-
/// Splicing was introduced in Eclair v0.10.0+. Our Docker image uses
117-
/// v0.14-SNAPSHOT which should support it; un-ignore once confirmed.
116+
/// CI confirmed: Eclair splice_in times out waiting for SplicePending event.
117+
/// LDK↔Eclair splice negotiation does not complete (likely protocol mismatch).
118118
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
119-
119+
#[ignore = "LDK↔Eclair splice negotiation times out (SplicePending not received)"]
120120
async fn test_eclair_splice() {
121121
let (bitcoind, electrs, eclair) = setup_clients().await;
122122
let node = setup_ldk_node();
@@ -131,7 +131,7 @@ async fn test_eclair_splice() {
131131
}
132132

133133
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
134-
134+
#[ignore = "LDK↔Eclair splice negotiation times out (SplicePending not received)"]
135135
async fn test_eclair_splice_then_payment() {
136136
let (bitcoind, electrs, eclair) = setup_clients().await;
137137
let node = setup_ldk_node();

0 commit comments

Comments
 (0)