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

Function test_pay_waitblockheight_timeout

tests/test_pay.py:5017–5028  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

5015
5016
5017def test_pay_waitblockheight_timeout(node_factory, bitcoind):
5018 plugin = os.path.join(os.path.dirname(__file__), 'plugins', 'endlesswaitblockheight.py')
5019 l1, l2 = node_factory.line_graph(2, opts=[{}, {'plugin': plugin}])
5020
5021 sync_blockheight(bitcoind, [l1, l2])
5022 inv = l2.rpc.invoice(42, 'lbl', 'desc')['bolt11']
5023
5024 with pytest.raises(RpcError, match=r'Timed out waiting for blockheight 2147483647\.'):
5025 l1.rpc.xpay(inv)
5026
5027 # Should have only one attempt that triggered the wait, which then failed.
5028 assert len(l1.rpc.listsendpays()['payments']) == 1
5029
5030
5031def test_dev_rawrequest(node_factory):

Callers

nothing calls this directly

Calls 6

sync_blockheightFunction · 0.90
joinMethod · 0.80
line_graphMethod · 0.80
listsendpaysMethod · 0.80
invoiceMethod · 0.45
xpayMethod · 0.45

Tested by

no test coverage detected