MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_multifunding_all_amount

Function test_multifunding_all_amount

tests/test_opening.py:3321–3341  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

3319
3320
3321def test_multifunding_all_amount(node_factory, bitcoind):
3322 l1, l2, l3 = node_factory.get_nodes(3)
3323
3324 l1.fundwallet(2000000)
3325
3326 destinations = [{"id": '{}@localhost:{}'.format(l2.info['id'], l2.port),
3327 "amount": 50000},
3328 {"id": '{}@localhost:{}'.format(l3.info['id'], l3.port),
3329 "amount": "all"}]
3330
3331 l1.rpc.multifundchannel(destinations, minchannels=2)
3332
3333 bitcoind.generate_block(6, wait_for_mempool=1)
3334
3335 wait_for(lambda: [c['state'] for c in (l1.rpc.listpeerchannels()['channels'])] == ['CHANNELD_NORMAL', 'CHANNELD_NORMAL'])
3336
3337 inv = l2.rpc.invoice(5000, 'i1', 'i1')['bolt11']
3338 l1.rpc.xpay(inv)
3339
3340 inv2 = l3.rpc.invoice(100000, 'i2', 'i2')['bolt11']
3341 l1.rpc.xpay(inv2)
3342
3343
3344@pytest.mark.parametrize("dopay", [True, False]) # Whether to send a payment or not

Callers

nothing calls this directly

Calls 8

wait_forFunction · 0.90
get_nodesMethod · 0.80
fundwalletMethod · 0.80
multifundchannelMethod · 0.80
generate_blockMethod · 0.80
listpeerchannelsMethod · 0.80
invoiceMethod · 0.45
xpayMethod · 0.45

Tested by

no test coverage detected