From 9bb2b4a9098d6d3e4c19bf9ec00c7c9794cb858f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 11 Feb 2021 15:39:35 +1030 Subject: [PATCH] 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 --- tests/test_connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_connection.py b/tests/test_connection.py index 363abb7cc..ee6510bb9 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -2331,6 +2331,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor): l1.rpc.close(l2.info['id']) wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0) bitcoind.generate_block(100) + sync_blockheight(bitcoind, [l1, l2]) # Can do unilateral close. l2.rpc.connect(l1.info['id'], 'localhost', l1.port) @@ -2342,6 +2343,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor): bitcoind.generate_block(5) wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0) bitcoind.generate_block(100) + sync_blockheight(bitcoind, [l1, l2]) # Start estimatesmartfee. l1.set_feerates((15000, 11000, 7500, 3750), True)