mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 06:55:13 +01:00
pytest: reproduce issue #3591
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
parent
3e9fcc43f9
commit
0b99e2cc42
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue