From 8221ab4aee3cb401513ba2c8d9e1cf41fae903c1 Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Sun, 4 Feb 2024 13:27:52 +0100 Subject: [PATCH] tests: multifundchannel and "all" amount --- tests/test_opening.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_opening.py b/tests/test_opening.py index d0f9b83116de..2791db2227dc 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -2685,3 +2685,26 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): assert ret['channel_type']['bits'] == [STATIC_REMOTEKEY] assert only_one(l1.rpc.listpeerchannels(l3.info['id'])['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY] assert only_one(l3.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY] + + +# @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') +# @pytest.mark.openchannel('v2') +def test_multifunding_all_amount(node_factory, bitcoind): + l1, l2, l3 = node_factory.get_nodes(3) + + l1.fundwallet(2000000) + + destinations = [{"id": '{}@localhost:{}'.format(l2.info['id'], l2.port), + "amount": 50000}, + {"id": '{}@localhost:{}'.format(l3.info['id'], l3.port), + "amount": "all"}] + + l1.rpc.multifundchannel(destinations, minchannels=2) + + bitcoind.generate_block(6, wait_for_mempool=1) + + inv = l2.rpc.invoice(5000, 'i1', 'i1')['bolt11'] + l1.rpc.pay(inv) + + inv2 = l3.rpc.invoice(100000, 'i2', 'i2')['bolt11'] + l1.rpc.pay(inv2)