From d4dfb3e3e5adaad11aca8ad0c277350bdf82f75c Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 13 Jul 2020 16:08:13 +0200 Subject: [PATCH] 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. --- plugins/libplugin-pay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 21f6045e8..007ddf6a5 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -956,7 +956,7 @@ static void payment_finished(struct payment *p); * child-spawning state and all of its children are in a final state. */ 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; else if (p->step == PAYMENT_STEP_SPLIT || p->step == PAYMENT_STEP_RETRY) { bool running_children = false;