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

Function test_pay_error_update_fees

tests/test_pay.py:285–311  ·  view source on GitHub ↗

We should process an update inside a temporary_channel_failure

(node_factory)

Source from the content-addressed store, hash-verified

283
284
285def test_pay_error_update_fees(node_factory):
286 """We should process an update inside a temporary_channel_failure"""
287 l1, l2, l3 = node_factory.line_graph(3, fundchannel=True, wait_for_announce=True)
288
289 # Don't include any routehints in first invoice.
290 inv1 = l3.dev_invoice(amount_msat=123000,
291 label='test_pay_error_update_fees',
292 description='description',
293 dev_routes=[])
294
295 inv2 = l3.rpc.invoice(123000, 'test_pay_error_update_fees2', 'desc') # noqa: F841
296
297 # Make sure l2 doesn't tell l1 directly that channel fee is changed.
298 l2.rpc.dev_suppress_gossip()
299 l2.rpc.setchannel(l3.info['id'], 1337, 137, enforcedelay=0)
300
301 # Should bounce off and retry...
302 ret = l1.rpc.pay(inv1['bolt11'])
303 assert ret['parts'] == 2
304 payments = l1.rpc.listsendpays(inv1['bolt11'])['payments']
305 assert len(payments) == 2
306
307 # Should ignore old routehint and do the same...
308 ret = l1.rpc.pay(inv2['bolt11'])
309 assert ret['parts'] == 2
310 payments = l1.rpc.listsendpays(inv2['bolt11'])['payments']
311 assert len(payments) == 2
312
313
314def test_pay_optional_args(node_factory):

Callers

nothing calls this directly

Calls 6

line_graphMethod · 0.80
dev_invoiceMethod · 0.80
setchannelMethod · 0.80
listsendpaysMethod · 0.80
invoiceMethod · 0.45
payMethod · 0.45

Tested by

no test coverage detected