Test askrene's route timeout
(node_factory, bitcoind)
| 1957 | |
| 1958 | |
| 1959 | def test_askrene_timeout(node_factory, bitcoind): |
| 1960 | """Test askrene's route timeout""" |
| 1961 | l1, l2 = node_factory.line_graph(2, opts=[{'broken_log': 'linear_routes: timed out after deadline'}, {}]) |
| 1962 | |
| 1963 | assert l1.rpc.listconfigs('askrene-timeout')['configs']['askrene-timeout']['value_int'] == 10 |
| 1964 | l1.rpc.getroutes(source=l1.info['id'], |
| 1965 | destination=l2.info['id'], |
| 1966 | amount_msat=1, |
| 1967 | layers=['auto.localchans'], |
| 1968 | maxfee_msat=1, |
| 1969 | final_cltv=5) |
| 1970 | |
| 1971 | # It will exit instantly. |
| 1972 | l1.rpc.setconfig('askrene-timeout', 0) |
| 1973 | |
| 1974 | with pytest.raises(RpcError, match='linear_routes: timed out after deadline'): |
| 1975 | l1.rpc.getroutes(source=l1.info['id'], |
| 1976 | destination=l2.info['id'], |
| 1977 | amount_msat=1, |
| 1978 | layers=['auto.localchans'], |
| 1979 | maxfee_msat=1, |
| 1980 | final_cltv=5) |
| 1981 | |
| 1982 | # We can put it back though. |
| 1983 | l1.rpc.setconfig('askrene-timeout', 10) |
| 1984 | l1.rpc.getroutes(source=l1.info['id'], |
| 1985 | destination=l2.info['id'], |
| 1986 | amount_msat=1, |
| 1987 | layers=['auto.localchans'], |
| 1988 | maxfee_msat=1, |
| 1989 | final_cltv=5) |
| 1990 | |
| 1991 | |
| 1992 | def test_reservations_leak(node_factory, executor): |
nothing calls this directly
no test coverage detected