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

Function flows_short

plugins/askrene/child/refine.c:436–442  ·  view source on GitHub ↗

Return true (and set shortage) if flow doesn't deliver this much */

Source from the content-addressed store, hash-verified

434
435/* Return true (and set shortage) if flow doesn't deliver this much */
436static bool flows_short(struct flow **flows,
437 struct amount_msat deliver,
438 struct amount_msat *shortage)
439{
440 return amount_msat_sub(shortage, deliver, sum_all_deliver(flows))
441 && !amount_msat_is_zero(*shortage);
442}
443
444/* It increases the flows to meet the deliver target. It does not increase any
445 * flow beyond the tolerance fraction (unless negative).

Callers 1

increase_flowsFunction · 0.85

Calls 3

amount_msat_subFunction · 0.85
sum_all_deliverFunction · 0.85
amount_msat_is_zeroFunction · 0.85

Tested by

no test coverage detected