mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
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.
This commit is contained in:
parent
063b319da1
commit
9915386c4a
@ -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…
Reference in New Issue
Block a user