mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
pay: Fix wrong result being returned by pay
We were checking against the wrong enum value, resulting in an erroneous `pending` state as a final result. Changelog-Fixed: pay: `pay` would sometimes misreport a final state of `pending` instead of `failed`
This commit is contained in:
parent
91497b7ee5
commit
6ad8a8a3c9
@ -1949,7 +1949,7 @@ static void payment_finished(struct payment *p)
|
||||
* success. */
|
||||
json_add_string(ret, "status", "complete");
|
||||
|
||||
} else if (result.leafstates & ~PAYMENT_FAILED) {
|
||||
} else if (result.leafstates & ~PAYMENT_STEP_FAILED) {
|
||||
/* If there are non-failed leafs we are still trying. */
|
||||
json_add_string(ret, "status", "pending");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user