Browse Source

paymod: Count all attempts, not just the ones with a result

With the presplitter in particular we would have n attempts but the array
contains n+1 entries, which is kinda weird.
travis-test
Christian Decker 5 years ago
parent
commit
2044f70577
  1. 3
      plugins/libplugin-pay.c

3
plugins/libplugin-pay.c

@ -91,8 +91,7 @@ struct payment_tree_result payment_collect_result(struct payment *p)
struct payment_tree_result res;
size_t numchildren = tal_count(p->children);
res.sent = AMOUNT_MSAT(0);
/* If we didn't have a route, we didn't attempt. */
res.attempts = p->route == NULL ? 0 : 1;
res.attempts = 1;
res.treestates = p->step;
res.leafstates = 0;
res.preimage = NULL;

Loading…
Cancel
Save