mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
txprepare: add test for multiple withdraw-to outputs
adds (currently failing test) for a txprepare with more than two outputs
This commit is contained in:
committed by
Christian Decker
parent
1763960c4a
commit
f15d34465d
@@ -265,6 +265,22 @@ def test_deprecated_txprepare(node_factory, bitcoind):
|
||||
l1.rpc.call('txprepare', {'destination': addr, 'satoshi': Millisatoshi(amount * 100)})
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
def test_txprepare_multi(node_factory, bitcoind):
|
||||
amount = 10000000
|
||||
l1 = node_factory.get_node(random_hsm=True)
|
||||
|
||||
bitcoind.rpc.sendtoaddress(l1.rpc.newaddr()['bech32'], amount / 10**8)
|
||||
bitcoind.generate_block(1)
|
||||
wait_for(lambda: len(l1.rpc.listfunds()['outputs']) == 1)
|
||||
|
||||
outputs = []
|
||||
for i in range(9):
|
||||
outputs.append({l1.rpc.newaddr()['bech32']: Millisatoshi(amount * 100)})
|
||||
prep = l1.rpc.txprepare(outputs=outputs)
|
||||
l1.rpc.txdiscard(prep['txid'])
|
||||
|
||||
|
||||
def test_txprepare(node_factory, bitcoind, chainparams):
|
||||
amount = 1000000
|
||||
l1 = node_factory.get_node(random_hsm=True)
|
||||
|
||||
Reference in New Issue
Block a user