Browse Source

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 <rusty@rustcorp.com.au>
master
Rusty Russell 4 years ago
committed by Christian Decker
parent
commit
9bb2b4a909
  1. 2
      tests/test_connection.py

2
tests/test_connection.py

@ -2331,6 +2331,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
l1.rpc.close(l2.info['id']) l1.rpc.close(l2.info['id'])
wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0) wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0)
bitcoind.generate_block(100) bitcoind.generate_block(100)
sync_blockheight(bitcoind, [l1, l2])
# Can do unilateral close. # Can do unilateral close.
l2.rpc.connect(l1.info['id'], 'localhost', l1.port) 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) bitcoind.generate_block(5)
wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0) wait_for(lambda: len(bitcoind.rpc.getrawmempool()) > 0)
bitcoind.generate_block(100) bitcoind.generate_block(100)
sync_blockheight(bitcoind, [l1, l2])
# Start estimatesmartfee. # Start estimatesmartfee.
l1.set_feerates((15000, 11000, 7500, 3750), True) l1.set_feerates((15000, 11000, 7500, 3750), True)

Loading…
Cancel
Save