Skip to content

Commit fb0f62e

Browse files
rustyrussellShahanaFarooqui
authored andcommitted
CI: fix flake in test_penalty_htlc_tx_timeout
Make sure l1 sees the l5 channel! ``` 2025-04-29T02:39:42.1086397Z # now we send two 'sticky' htlcs, l1->l5 + l4->l1 2025-04-29T02:39:42.1086837Z amt = 10**8 // 2 2025-04-29T02:39:42.1087231Z sticky_inv_1 = l5.rpc.invoice(amt, '2', 'sticky') 2025-04-29T02:39:42.1087767Z > route = l1.rpc.getroute(l5.info['id'], amt, 1)['route'] 2025-04-29T02:39:42.1088126Z 2025-04-29T02:39:42.1088279Z tests/test_closing.py:1432: ... 2025-04-29T02:39:42.1111693Z elif "error" in resp: 2025-04-29T02:39:42.1111976Z > raise RpcError(method, payload, resp['error']) 2025-04-29T02:39:42.1113258Z E pyln.client.lightning.RpcError: RPC call failed: method: getroute, payload: {'id': '032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e', 'amount_msat': 50000000, 'riskfactor': 1, 'cltv': 9}, error: {'code': -32602, 'message': '032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e: unknown destination node_id (no public channels?)'} ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 099a7ec commit fb0f62e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_closing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,8 +1414,12 @@ def test_penalty_htlc_tx_timeout(node_factory, bitcoind, chainparams, anchors):
14141414

14151415
l1, l2, l3, l4, l5 = node_factory.get_nodes(5, opts=opts)
14161416

1417-
node_factory.join_nodes([l1, l2, l3, l4], wait_for_announce=True)
1418-
node_factory.join_nodes([l3, l5], wait_for_announce=True)
1417+
node_factory.join_nodes([l1, l2, l3, l4])
1418+
node_factory.join_nodes([l3, l5])
1419+
bitcoind.generate_block(5)
1420+
# Make sure all nodes see all channels!
1421+
for n in (l1, l2, l3, l4, l5):
1422+
wait_for(lambda: len(n.rpc.listchannels()['channels']) == 4 * 2)
14191423

14201424
channel_id = first_channel_id(l2, l3)
14211425

0 commit comments

Comments
 (0)