Skip to content

Commit 9bb2b4a

Browse files
rustyrussellcdecker
authored andcommitted
pytest: fix flake in test_no_fee_estimate()
We reserve utxos by blockheight, and producing 100 blocks can unreserve them! ``` > raise RpcError(method, payload, resp['error']) E pyln.client.lightning.RpcError: RPC call failed: method: fundchannel, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'amount': 1000000, 'feerate': 'slow', 'announce': True}, error: {'code': -1, 'message': 'Aborting PSBT signing. UTXO d32e772e81db79c5eb3a8b58ab69174c540eefb6fa8b444fae300a7e35d5c987:0 is not reserved'} ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent c397efe commit 9bb2b4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
23312331
l1.rpc.close(l2.info['id'])
23322332
wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0)
23332333
bitcoind.generate_block(100)
2334+
sync_blockheight(bitcoind, [l1, l2])
23342335

23352336
# Can do unilateral close.
23362337
l2.rpc.connect(l1.info['id'], 'localhost', l1.port)
@@ -2342,6 +2343,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
23422343
bitcoind.generate_block(5)
23432344
wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0)
23442345
bitcoind.generate_block(100)
2346+
sync_blockheight(bitcoind, [l1, l2])
23452347

23462348
# Start estimatesmartfee.
23472349
l1.set_feerates((15000, 11000, 7500, 3750), True)

0 commit comments

Comments
 (0)