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

Function flow_fee

plugins/askrene/child/flow.c:90–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90struct amount_msat flow_fee(const struct flow *flow)
91{
92 struct amount_msat spend = flow_spend(flow);
93 struct amount_msat fee;
94 if (!amount_msat_sub(&fee, spend, flow->delivers)) {
95 child_err("Could not subtract %s from %s for fee",
96 fmt_amount_msat(tmpctx, flow->delivers),
97 fmt_amount_msat(tmpctx, spend));
98 }
99
100 return fee;
101}
102
103struct amount_msat flowset_fee(struct flow **flows)
104{

Callers 2

linear_routesFunction · 0.70
flowset_feeFunction · 0.70

Calls 4

amount_msat_subFunction · 0.85
child_errFunction · 0.85
flow_spendFunction · 0.70
fmt_amount_msatFunction · 0.50

Tested by

no test coverage detected