mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 06:54:30 +01:00
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:
committed by
Rusty Russell
parent
1274d34822
commit
b2463b12c0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user