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

Function channel_usable

devtools/topology.c:15–26  ·  view source on GitHub ↗

We ignore capacity constraints */

Source from the content-addressed store, hash-verified

13
14/* We ignore capacity constraints */
15static bool channel_usable(const struct gossmap *map,
16 const struct gossmap_chan *c,
17 int dir,
18 struct amount_msat amount,
19 void *unused)
20{
21 if (!gossmap_chan_set(c, dir))
22 return false;
23 if (!c->half[dir].enabled)
24 return false;
25 return true;
26}
27
28/* Note: dijkstra() sets dir to the neighbor side; i.e. c->half[dir].node_idx is the
29 * neighbor. */

Callers 3

channel_usable_to_exclFunction · 0.85
channel_usable_from_exclFunction · 0.85
visitFunction · 0.85

Calls 1

gossmap_chan_setFunction · 0.85

Tested by

no test coverage detected