From 041ee930a4ffe82d772505556fbaf4b38101c65e 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 6bffd3b1f..4754cd058 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;