mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
payalgo: Remove reporting PAY_TRY_ANOTHER_ROUTE and PAY_UNPARSEABLE_ONION.
These error codes will cause `pay` to retry, so `pay` will never actually report those error codes. Those error codes will only get reported at the `sendpay` level.
This commit is contained in:
committed by
Christian Decker
parent
694fb41ef6
commit
6c9d81ef42
@@ -77,21 +77,11 @@ static void json_pay_failure(struct command *cmd,
|
||||
break;
|
||||
|
||||
case PAY_UNPARSEABLE_ONION:
|
||||
data = new_json_result(cmd);
|
||||
json_object_start(data, NULL);
|
||||
json_add_hex(data, "onionreply",
|
||||
r->onionreply, tal_len(r->onionreply));
|
||||
json_object_end(data);
|
||||
|
||||
msg = tal_fmt(cmd,
|
||||
"failed: WIRE_PERMANENT_NODE_FAILURE "
|
||||
"(%s)",
|
||||
r->details);
|
||||
|
||||
/* Impossible case */
|
||||
abort();
|
||||
break;
|
||||
|
||||
case PAY_DESTINATION_PERM_FAIL:
|
||||
case PAY_TRY_OTHER_ROUTE:
|
||||
fail = r->routing_failure;
|
||||
data = new_json_result(cmd);
|
||||
|
||||
@@ -117,6 +107,11 @@ static void json_pay_failure(struct command *cmd,
|
||||
r->details);
|
||||
|
||||
break;
|
||||
|
||||
case PAY_TRY_OTHER_ROUTE:
|
||||
/* Impossible case */
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
assert(msg);
|
||||
|
||||
Reference in New Issue
Block a user