Skip to content

Commit cfeab1c

Browse files
committed
debug: print close_channel error and peer connection status
1 parent 659dc39 commit cfeab1c

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

docker-compose-cln.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
bitcoin:
3-
image: blockstream/bitcoind:30.2
3+
image: blockstream/bitcoind:29.0
44
platform: linux/amd64
55
command:
66
[
@@ -11,16 +11,11 @@ services:
1111
"-rpcbind=0.0.0.0",
1212
"-rpcuser=user",
1313
"-rpcpassword=pass",
14-
"-fallbackfee=0.00001",
15-
"-rest",
16-
"-zmqpubrawblock=tcp://0.0.0.0:28332",
17-
"-zmqpubrawtx=tcp://0.0.0.0:28333"
14+
"-fallbackfee=0.00001"
1815
]
1916
ports:
20-
- "18443:18443"
21-
- "18444:18444"
22-
- "28332:28332"
23-
- "28333:28333"
17+
- "18443:18443" # Regtest RPC port
18+
- "18444:18444" # Regtest P2P port
2419
networks:
2520
- bitcoin-electrs
2621
healthcheck:
@@ -53,23 +48,19 @@ services:
5348
- bitcoin-electrs
5449

5550
cln:
56-
image: elementsproject/lightningd:v25.12.1
51+
image: blockstream/lightningd:v23.08
5752
platform: linux/amd64
5853
depends_on:
5954
bitcoin:
6055
condition: service_healthy
61-
volumes:
62-
- ${CLN_DATA_DIR:-/tmp/cln-data}:/root/.lightning
6356
command:
6457
[
6558
"--bitcoin-rpcconnect=bitcoin",
6659
"--bitcoin-rpcport=18443",
6760
"--bitcoin-rpcuser=user",
6861
"--bitcoin-rpcpassword=pass",
6962
"--regtest",
70-
"--experimental-splicing",
71-
"--allow-deprecated-apis=true",
72-
"--rpc-file-mode=0666",
63+
"--experimental-anchors",
7364
]
7465
ports:
7566
- "19846:19846"

docker-compose-lnd.yml

100644100755
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
bitcoin:
3-
image: blockstream/bitcoind:30.2
3+
image: blockstream/bitcoind:29.0
44
platform: linux/amd64
55
command:
66
[
@@ -12,15 +12,14 @@ services:
1212
"-rpcuser=user",
1313
"-rpcpassword=pass",
1414
"-fallbackfee=0.00001",
15-
"-rest",
1615
"-zmqpubrawblock=tcp://0.0.0.0:28332",
1716
"-zmqpubrawtx=tcp://0.0.0.0:28333"
1817
]
1918
ports:
20-
- "18443:18443"
21-
- "18444:18444"
22-
- "28332:28332"
23-
- "28333:28333"
19+
- "18443:18443" # Regtest RPC port
20+
- "18444:18444" # Regtest P2P port
21+
- "28332:28332" # ZMQ block port
22+
- "28333:28333" # ZMQ tx port
2423
networks:
2524
- bitcoin-electrs
2625
healthcheck:
@@ -53,13 +52,12 @@ services:
5352
- bitcoin-electrs
5453

5554
lnd:
56-
image: lightninglabs/lnd:v0.20.1-beta
55+
image: lightninglabs/lnd:v0.18.5-beta
5756
container_name: ldk-node-lnd
5857
depends_on:
59-
bitcoin:
60-
condition: service_healthy
58+
- bitcoin
6159
volumes:
62-
- ${LND_DATA_DIR:-/tmp/lnd-data}:/root/.lnd
60+
- ${LND_DATA_DIR}:/root/.lnd
6361
ports:
6462
- "8081:8081"
6563
- "9735:9735"

tests/common/scenarios/channel.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ pub(crate) async fn cooperative_close_by_ldk<E: ElectrumApi>(
139139
user_channel_id: &ldk_node::UserChannelId,
140140
) {
141141
let ext_node_id = peer.get_node_id().await.unwrap();
142-
node.close_channel(user_channel_id, ext_node_id).unwrap();
142+
let connected = node.list_peers().iter().any(|p| p.node_id == ext_node_id && p.is_connected);
143+
println!(
144+
"[close] Attempting cooperative close. Peer {} connected: {}",
145+
ext_node_id, connected
146+
);
147+
node.close_channel(user_channel_id, ext_node_id)
148+
.unwrap_or_else(|e| panic!("[close] cooperative close failed: {:?}. Peer connected: {}", e, connected));
143149
generate_blocks_and_wait(bitcoind, electrs, 1).await;
144150
node.sync_wallets().unwrap();
145151
expect_channel_closed(node, true).await;

0 commit comments

Comments
 (0)