mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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
|
||||
|
||||
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'])
|
||||
|
||||
err = excinfo.value
|
||||
# Complaints it couldn't find route.
|
||||
# Complains it stopped after several attempts.
|
||||
# FIXME: include in pylightning
|
||||
PAY_ROUTE_NOT_FOUND = 205
|
||||
assert err.error['code'] == PAY_ROUTE_NOT_FOUND
|
||||
PAY_STOPPED_RETRYING = 210
|
||||
assert err.error['code'] == PAY_STOPPED_RETRYING
|
||||
|
||||
status = only_one(l1.rpc.call('paystatus')['pay'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user