Nicer error messages when we disable the only channel to the destination.
(node_factory)
| 1354 | |
| 1355 | |
| 1356 | def test_error_messages(node_factory): |
| 1357 | """Nicer error messages when we disable the only channel to the destination.""" |
| 1358 | plugin = os.path.join(os.path.dirname(__file__), 'plugins/replace_payload.py') |
| 1359 | l1, l2 = node_factory.line_graph( |
| 1360 | 2, |
| 1361 | opts=[{}, {"plugin": plugin}], |
| 1362 | wait_for_announce=True |
| 1363 | ) |
| 1364 | |
| 1365 | # Replace with an invalid payload. |
| 1366 | l2.rpc.call('setpayload', ['0000']) |
| 1367 | inv = l2.rpc.invoice(123, 'test_error_messages', 'test_error_messages')['bolt11'] |
| 1368 | scidd = first_scidd(l1, l2) |
| 1369 | with pytest.raises(RpcError, match=rf"Failed after 1 attempts\. Unexpected error \(invalid_onion_payload\) from final node: disabling {scidd} for this payment\. Then routing failed: We could not find a usable set of paths\. All 1 channels to the source are disabled."): |
| 1370 | l1.rpc.xpay(inv) |
| 1371 | |
| 1372 | |
| 1373 | def test_blinded_path_fees(node_factory): |
nothing calls this directly
no test coverage detected