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

Function gossmap_node_idx

common/gossmap.c:173–177  ·  view source on GitHub ↗

Each channel has a unique (low) index. */

Source from the content-addressed store, hash-verified

171
172/* Each channel has a unique (low) index. */
173u32 gossmap_node_idx(const struct gossmap *map, const struct gossmap_node *node)
174{
175 assert(node - map->node_arr < map->num_node_arr);
176 return node - map->node_arr;
177}
178
179u32 gossmap_chan_idx(const struct gossmap *map, const struct gossmap_chan *chan)
180{

Callers 15

get_dijkstraFunction · 0.85
dijkstra_to_hopsFunction · 0.85
new_nodeFunction · 0.85
remove_nodeFunction · 0.85
add_channelFunction · 0.85
gossmap_nth_chanFunction · 0.85
channel_is_betweenFunction · 0.85
channel_is_betweenFunction · 0.85
filter_routehintsFunction · 0.85
least_costFunction · 0.85
visitFunction · 0.85
clean_topoFunction · 0.85

Calls

no outgoing calls

Tested by 2

channel_is_betweenFunction · 0.68
channel_is_betweenFunction · 0.68