Skip to content

Commit

Permalink
tests: multifundchannel and "all" amount
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 committed Feb 4, 2024
1 parent 28c4a52 commit 8221ab4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8221ab4

Please sign in to comment.