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

Function route_score_cheaper

common/route.c:55–62  ·  view source on GitHub ↗

Prioritize costs over distance */

Source from the content-addressed store, hash-verified

53
54/* Prioritize costs over distance */
55u64 route_score_cheaper(struct amount_msat fee,
56 struct amount_msat risk,
57 struct amount_msat total UNUSED,
58 int dir UNUSED,
59 const struct gossmap_chan *c UNUSED)
60{
61 return ((u64)costs_to_score(fee, risk) << 32) + 1;
62}
63
64/* Recursive version: return false if we can't get there.
65 *

Callers

nothing calls this directly

Calls 1

costs_to_scoreFunction · 0.85

Tested by

no test coverage detected