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

Function flowset_fee

plugins/askrene/child/flow.c:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103struct amount_msat flowset_fee(struct flow **flows)
104{
105 struct amount_msat fee = AMOUNT_MSAT(0);
106 for (size_t i = 0; i < tal_count(flows); i++) {
107 struct amount_msat this_fee = flow_fee(flows[i]);
108 if (!amount_msat_accumulate(&fee, this_fee)) {
109 child_err("Could not add %s to %s for flowset fee",
110 fmt_amount_msat(tmpctx, this_fee),
111 fmt_amount_msat(tmpctx, fee));
112 }
113 }
114 return fee;
115}
116
117/* Helper to access the half chan at flow index idx */
118const struct half_chan *flow_edge(const struct flow *flow, size_t idx)

Callers 1

linear_routesFunction · 0.70

Calls 4

amount_msat_accumulateFunction · 0.85
child_errFunction · 0.85
flow_feeFunction · 0.70
fmt_amount_msatFunction · 0.50

Tested by

no test coverage detected