Browse Source

pytest: Stabilize test_no_fee_estimate against UTXO selection issues

The test was implicitly relying on us selecting the larger output and then not
touching the smaller, leaving it there for the final `withdraw` to claim. This
ordering of UTXOs is not guaranteed, and in particular can fail when switching
DB backends. To stabilize we just need to make sure to select the change
output as well.
travis-debug
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
9915386c4a
  1. 5
      tests/test_connection.py

5
tests/test_connection.py

@ -1583,8 +1583,9 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l1.rpc.fundchannel(l2.info['id'], 10**6, 'slow')
# Can withdraw (use urgent feerate).
l1.rpc.withdraw(l2.rpc.newaddr()['bech32'], 'all', 'urgent')
# Can withdraw (use urgent feerate). `minconf` may be needed depending on
# the previous `fundchannel` selecting all confirmed outputs.
l1.rpc.withdraw(l2.rpc.newaddr()['bech32'], 'all', 'urgent', minconf=0)
@unittest.skipIf(not DEVELOPER, "needs --dev-disconnect")

Loading…
Cancel
Save