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

Function flowset_fee

plugins/renepay/flow.c:392–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392bool flowset_fee(struct amount_msat *ret, struct flow **flows)
393{
394 assert(ret);
395 assert(flows);
396 struct amount_msat fee = AMOUNT_MSAT(0);
397 for (size_t i = 0; i < tal_count(flows); i++) {
398 struct amount_msat this_fee;
399 if (!flow_fee(&this_fee, flows[i]))
400 return false;
401 if (!amount_msat_add(&fee, this_fee, fee))
402 return false;
403 }
404 *ret = fee;
405 return true;
406}
407
408/* Helper to access the half chan at flow index idx */
409const struct half_chan *flow_edge(const struct flow *flow, size_t idx)

Callers 1

minflowFunction · 0.70

Calls 2

amount_msat_addFunction · 0.85
flow_feeFunction · 0.70

Tested by

no test coverage detected