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

Function test_pay_while_opening_channel

tests/test_pay.py:5954–5967  ·  view source on GitHub ↗
(node_factory, bitcoind, executor)

Source from the content-addressed store, hash-verified

5952
5953
5954def test_pay_while_opening_channel(node_factory, bitcoind, executor):
5955 delay_plugin = {'plugin': os.path.join(os.getcwd(),
5956 'tests/plugins/openchannel_hook_delay.py'),
5957 'delaytime': '10'}
5958 l1, l2 = node_factory.line_graph(2, fundamount=10**6, wait_for_announce=True)
5959 l3 = node_factory.get_node(options=delay_plugin)
5960 l1.connect(l3)
5961 executor.submit(l1.rpc.fundchannel, l3.info['id'], 100000)
5962 wait_for(lambda: l1.rpc.listpeerchannels(l3.info['id'])['channels'] != [])
5963
5964 # the uncommitted channel should now show up in listpeerchannels
5965 assert only_one(l1.rpc.listpeerchannels(l3.info['id'])['channels'])['state'] == 'OPENINGD'
5966 inv = l2.rpc.invoice(10000, "inv", "inv")
5967 l1.rpc.pay(inv['bolt11'])
5968
5969
5970def test_offer_paths(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 9

wait_forFunction · 0.90
only_oneFunction · 0.90
joinMethod · 0.80
line_graphMethod · 0.80
listpeerchannelsMethod · 0.80
get_nodeMethod · 0.45
connectMethod · 0.45
invoiceMethod · 0.45
payMethod · 0.45

Tested by

no test coverage detected