mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
mpp: Consider an abort as the payment being finished
If one part sets the root to be aborted, there is little point in continuing to wait for the remainder, return to the caller immediately.
This commit is contained in:
@@ -956,7 +956,7 @@ static void payment_finished(struct payment *p);
|
|||||||
* child-spawning state and all of its children are in a final state. */
|
* child-spawning state and all of its children are in a final state. */
|
||||||
static bool payment_is_finished(const struct payment *p)
|
static bool payment_is_finished(const struct payment *p)
|
||||||
{
|
{
|
||||||
if (p->step == PAYMENT_STEP_FAILED || p->step == PAYMENT_STEP_SUCCESS)
|
if (p->step == PAYMENT_STEP_FAILED || p->step == PAYMENT_STEP_SUCCESS || p->abort)
|
||||||
return true;
|
return true;
|
||||||
else if (p->step == PAYMENT_STEP_SPLIT || p->step == PAYMENT_STEP_RETRY) {
|
else if (p->step == PAYMENT_STEP_SPLIT || p->step == PAYMENT_STEP_RETRY) {
|
||||||
bool running_children = false;
|
bool running_children = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user