From 0b99e2cc425b5b56028bdee51b7030577208e61a Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 16 Jun 2020 12:49:46 +0200 Subject: [PATCH] pytest: reproduce issue #3591 Signed-off-by: Antoine Poinsot --- tests/test_wallet.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 82818418b..66cc76223 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -15,6 +15,7 @@ import time import unittest +@pytest.mark.xfail(strict=True) @unittest.skipIf(TEST_NETWORK != 'regtest', "Test relies on a number of example addresses valid only in regtest") def test_withdraw(node_factory, bitcoind): amount = 1000000 @@ -146,11 +147,11 @@ def test_withdraw(node_factory, bitcoind): l1.rpc.withdraw(waddr, 'all') # Add some funds to withdraw - for i in range(10): + for i in range(12): l1.bitcoin.rpc.sendtoaddress(addr, amount / 10**8 + 0.01) bitcoind.generate_block(1) - wait_for(lambda: len(l1.rpc.listfunds()['outputs']) == 10) + wait_for(lambda: len(l1.rpc.listfunds()['outputs']) == 12) # Try passing in a utxo set utxos = [utxo["txid"] + ":" + str(utxo["output"]) for utxo in l1.rpc.listfunds()["outputs"]][:4] @@ -171,6 +172,10 @@ def test_withdraw(node_factory, bitcoind): uutxos = [u["txid"] + ":0" for u in unconfirmed_utxos] l1.rpc.withdraw(waddr, "all", minconf=0, utxos=uutxos) + # Try passing minimum feerates (for relay) + l1.rpc.withdraw(l1.rpc.newaddr()["bech32"], 10**5, feerate="253perkw") + l1.rpc.withdraw(l1.rpc.newaddr()["bech32"], 10**5, feerate="1000perkb") + def test_minconf_withdraw(node_factory, bitcoind): """Issue 2518: ensure that ridiculous confirmation levels don't overflow