MCPcopy Create free account
hub / github.com/ElementsProject/lightning / payment_aggregate_states

Function payment_aggregate_states

plugins/libplugin-pay.c:2049–2057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047}
2048
2049static enum payment_step payment_aggregate_states(struct payment *p)
2050{
2051 enum payment_step agg = p->step;
2052
2053 for (size_t i=0; i<tal_count(p->children); i++)
2054 agg |= payment_aggregate_states(p->children[i]);
2055
2056 return agg;
2057}
2058
2059/* A payment is finished if a) it is in a final state, of b) it's in a
2060 * child-spawning state and all of its children are in a final state. */

Callers 1

payment_is_successFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected