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

Function test_pay_maxdelay_direct_channel

tests/test_pay.py:142–150  ·  view source on GitHub ↗

Test that maxdelay is enforced even for direct channel payments

(node_factory)

Source from the content-addressed store, hash-verified

140
141
142def test_pay_maxdelay_direct_channel(node_factory):
143 """Test that maxdelay is enforced even for direct channel payments"""
144 l1, l2 = node_factory.line_graph(2, wait_for_announce=True)
145
146 inv = l2.rpc.invoice('10000msat', 'test_pay_maxdelay_direct', 'description')['bolt11']
147
148 # Delay too low for direct channel.
149 with pytest.raises(RpcError, match=r'Could not find route without excessive delays'):
150 l1.rpc.call('xpay', {'invstring': inv, 'maxdelay': 1})
151
152
153def test_pay_exclude_node(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 3

line_graphMethod · 0.80
invoiceMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected