Browse Source

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.
release-0.9.0
Christian Decker 5 years ago
parent
commit
041ee930a4
  1. 2
      plugins/libplugin-pay.c

2
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;

Loading…
Cancel
Save