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.
This commit is contained in:
Christian Decker
2020-07-19 19:52:18 +02:00
committed by Rusty Russell
parent 1274d34822
commit b2463b12c0

View File

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