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

Function flowset_delivers

plugins/renepay/flow.c:169–178  ·  view source on GitHub ↗

How much do we deliver to destination using this set of routes */

Source from the content-addressed store, hash-verified

167
168/* How much do we deliver to destination using this set of routes */
169bool flowset_delivers(struct amount_msat *delivers, struct flow **flows)
170{
171 struct amount_msat final = AMOUNT_MSAT(0);
172 for (size_t i = 0; i < tal_count(flows); i++) {
173 if (!amount_msat_accumulate(&final, flows[i]->amount))
174 return false;
175 }
176 *delivers = final;
177 return true;
178}
179
180/* FIXME: pass a pointer to const here */
181size_t flowset_size(struct flow **flows)

Callers

nothing calls this directly

Calls 1

amount_msat_accumulateFunction · 0.85

Tested by

no test coverage detected