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

Function test_fetch_no_description_offer

tests/test_pay.py:6153–6166  ·  view source on GitHub ↗

Reproducing the issue: https://github.com/ElementsProject/lightning/issues/7405

(node_factory)

Source from the content-addressed store, hash-verified

6151
6152
6153def test_fetch_no_description_offer(node_factory):
6154 """Reproducing the issue: https://github.com/ElementsProject/lightning/issues/7405"""
6155 l1, l2 = node_factory.line_graph(2, opts={'allow-deprecated-apis': True})
6156
6157 # Deprecated fields make schema checker upset.
6158 offer = l2.rpc.call('offer', {'amount': 'any'})
6159 inv = l1.rpc.call('fetchinvoice', {'offer': offer['bolt12'], 'amount_msat': '2sat'})
6160
6161 # Deprecated fields make schema checker upset.
6162 l1.rpc.jsonschemas = {}
6163 offer_decode = l1.rpc.decode(offer['bolt12'])
6164 assert offer_decode['type'] == 'bolt12 offer', f'No possible to decode the offer `{offer}`'
6165
6166 l1.rpc.pay(inv['invoice'])
6167
6168
6169def test_fetch_no_description_with_amount(node_factory):

Callers

nothing calls this directly

Calls 4

line_graphMethod · 0.80
callMethod · 0.45
decodeMethod · 0.45
payMethod · 0.45

Tested by

no test coverage detected