mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
pay: don't say "Could not find a route" unless we never tried a payment.
It's deeply confusing: we say this after exhausting all other routes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -199,6 +199,12 @@ static struct command_result *next_routehint(struct command *cmd,
|
||||
return command_fail(cmd, PAY_ROUTE_TOO_EXPENSIVE,
|
||||
"%s", pc->expensive_route);
|
||||
|
||||
if (tal_count(pc->ps->attempts) > 1)
|
||||
return command_fail(cmd, PAY_STOPPED_RETRYING,
|
||||
"Ran out of routes to try after"
|
||||
" %zu attempts: see paystatus",
|
||||
tal_count(pc->ps->attempts));
|
||||
|
||||
return command_fail(cmd, PAY_ROUTE_NOT_FOUND,
|
||||
"Could not find a route");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user