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

Function channel_usable_to_excl

devtools/topology.c:30–43  ·  view source on GitHub ↗

Note: dijkstra() sets dir to the neighbor side; i.e. c->half[dir].node_idx is the * neighbor. */

Source from the content-addressed store, hash-verified

28/* Note: dijkstra() sets dir to the neighbor side; i.e. c->half[dir].node_idx is the
29 * neighbor. */
30static bool channel_usable_to_excl(const struct gossmap *map,
31 const struct gossmap_chan *c,
32 int dir,
33 struct amount_msat amount,
34 struct gossmap_node *excl)
35{
36 if (!channel_usable(map, c, dir, amount, NULL))
37 return false;
38
39 /* Don't go via excl. */
40 if (c->half[dir].nodeidx == gossmap_node_idx(map, excl))
41 return false;
42 return true;
43}
44
45/* What nodes can reach n without going through exclude? */
46static size_t count_possible_sources(const struct gossmap *map,

Callers

nothing calls this directly

Calls 2

channel_usableFunction · 0.85
gossmap_node_idxFunction · 0.85

Tested by

no test coverage detected