mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: fix test_htlc_send_timeout now pay doesn't return ROUTE_NOT_FOUND.
This brings up an interesting quirk though, in that we report "3 attempts", where we really should have done one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1003,14 +1003,14 @@ def test_htlc_send_timeout(node_factory, bitcoind):
|
|||||||
timedout = True
|
timedout = True
|
||||||
|
|
||||||
inv = l3.rpc.invoice(123000, 'test_htlc_send_timeout', 'description')
|
inv = l3.rpc.invoice(123000, 'test_htlc_send_timeout', 'description')
|
||||||
with pytest.raises(RpcError) as excinfo:
|
with pytest.raises(RpcError, match=r'Ran out of routes to try after [0-9] attempts') as excinfo:
|
||||||
l1.rpc.pay(inv['bolt11'])
|
l1.rpc.pay(inv['bolt11'])
|
||||||
|
|
||||||
err = excinfo.value
|
err = excinfo.value
|
||||||
# Complaints it couldn't find route.
|
# Complains it stopped after several attempts.
|
||||||
# FIXME: include in pylightning
|
# FIXME: include in pylightning
|
||||||
PAY_ROUTE_NOT_FOUND = 205
|
PAY_STOPPED_RETRYING = 210
|
||||||
assert err.error['code'] == PAY_ROUTE_NOT_FOUND
|
assert err.error['code'] == PAY_STOPPED_RETRYING
|
||||||
|
|
||||||
status = only_one(l1.rpc.call('paystatus')['pay'])
|
status = only_one(l1.rpc.call('paystatus')['pay'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user