We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 775e0db + 948f289 commit 3385495Copy full SHA for 3385495
1 file changed
tests/integration_tests_cln.rs
@@ -64,7 +64,17 @@ fn test_cln() {
64
// Setup CLN
65
let sock = "/tmp/lightning-rpc";
66
let cln_client = LightningRPC::new(&sock);
67
- let cln_info = cln_client.getinfo().unwrap();
+ let cln_info = {
68
+ loop {
69
+ let info = cln_client.getinfo().unwrap();
70
+ // Wait for CLN to sync block height before channel open.
71
+ // Prevents crash due to unset blockheight (see LDK Node issue #527).
72
+ if info.blockheight > 0 {
73
+ break info;
74
+ }
75
+ std::thread::sleep(std::time::Duration::from_millis(250));
76
77
+ };
78
let cln_node_id = PublicKey::from_str(&cln_info.id).unwrap();
79
let cln_address: SocketAddress = match cln_info.binding.first().unwrap() {
80
NetworkAddress::Ipv4 { address, port } => {
0 commit comments