jsonrpc: Simplify the state decision of listpays

It was really different from the way we decide the overall state of a
`pay` command's output. Now we use a more similar state decision,
based on collecting all states and checking them at the end to
determine the outcome.
This commit is contained in:
Christian Decker
2021-04-28 14:01:20 +02:00
committed by Rusty Russell
parent 6ad8a8a3c9
commit e6d5df7918
2 changed files with 19 additions and 19 deletions

View File

@@ -30,9 +30,9 @@ struct createonion_request {
/* States returned by listsendpays, waitsendpay, etc. */
enum payment_result_state {
PAYMENT_PENDING,
PAYMENT_COMPLETE,
PAYMENT_FAILED,
PAYMENT_PENDING = 1,
PAYMENT_COMPLETE = 2,
PAYMENT_FAILED = 4,
};
/* A parsed version of the possible outcomes that a sendpay / payment may