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

Function channel_usable_from_excl

devtools/topology.c:75–88  ·  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

73/* Note: dijkstra() sets dir to the neighbor side; i.e. c->half[dir].node_idx is the
74 * neighbor. */
75static bool channel_usable_from_excl(const struct gossmap *map,
76 const struct gossmap_chan *c,
77 int dir,
78 struct amount_msat amount,
79 struct gossmap_node *excl)
80{
81 if (!channel_usable(map, c, !dir, amount, NULL))
82 return false;
83
84 /* Don't go via excl. */
85 if (c->half[dir].nodeidx == gossmap_node_idx(map, excl))
86 return false;
87 return true;
88}
89
90static size_t memcount(const void *mem, size_t len, char c)
91{

Callers

nothing calls this directly

Calls 2

channel_usableFunction · 0.85
gossmap_node_idxFunction · 0.85

Tested by

no test coverage detected