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

Function test_dev_rawrequest

tests/test_pay.py:5031–5043  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

5029
5030
5031def test_dev_rawrequest(node_factory):
5032 l1, l2 = node_factory.line_graph(2, fundchannel=False)
5033
5034 offer = l2.rpc.call('offer', {'amount': '2msat',
5035 'description': 'simple test'})
5036 # Get fetchinvoice to make us an invoice_request
5037 l1.rpc.call('fetchinvoice', {'offer': offer['bolt12']})
5038
5039 m = re.search(r'invoice_request: "([a-z0-9]*)"', l1.daemon.is_in_log('invoice_request:'))
5040 ret = l1.rpc.call('dev-rawrequest', {'invreq': m.group(1),
5041 'nodeid': l2.info['id'],
5042 'timeout': 10})
5043 assert 'invoice' in ret
5044
5045
5046def test_sendinvoice(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 3

line_graphMethod · 0.80
is_in_logMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected