mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: fix flake in tests/test_closing.py::test_closing_specified_destination
The close call can fail, since we already unilaterally closed since we mined blocks
too fast:
```
2023-01-14T01:00:10.2502199Z E pyln.client.lightning.RpcError: RPC call failed: method: close, payload: ['107x1x1', None, 'bcrt1qeyyk6sl5pr49ycpqyckvmttus5ttj25pd0zpvg'], error: {'code': -32602, 'message': "Short channel ID not active: '107x1x1'"}
...
2023-01-14T01:00:10.5288050Z lightningd-4 2023-01-14T00:59:59.650Z UNUSUAL 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-chan#1: Peer permanent failure in CHANNELD_NORMAL: Fulfilled HTLC 0 SENT_REMOVE_COMMIT cltv 113 hit deadline
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -289,6 +289,11 @@ def test_closing_specified_destination(node_factory, bitcoind, chainparams):
|
|||||||
l1.pay(l3, 100000000)
|
l1.pay(l3, 100000000)
|
||||||
l1.pay(l4, 100000000)
|
l1.pay(l4, 100000000)
|
||||||
|
|
||||||
|
# Make sure HTLCs completely expired before we mine, so they don't
|
||||||
|
# unilaterally close!
|
||||||
|
for n in l1, l2, l3, l4:
|
||||||
|
wait_for(lambda: all(c['htlcs'] == [] for c in n.rpc.listpeerchannels()['channels']))
|
||||||
|
|
||||||
mine_funding_to_announce(bitcoind, [l1, l2, l3, l4])
|
mine_funding_to_announce(bitcoind, [l1, l2, l3, l4])
|
||||||
|
|
||||||
addr = chainparams['example_addr']
|
addr = chainparams['example_addr']
|
||||||
|
|||||||
Reference in New Issue
Block a user