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

Function gossmap_random_node

common/gossmap.c:1572–1578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1570}
1571
1572struct gossmap_node *gossmap_random_node(const struct gossmap *map)
1573{
1574 ptrint_t *pi = nodeidx_htable_pick(map->nodes, pseudorand_u64(), NULL);
1575 if (pi)
1576 return ptrint2node(pi);
1577 return NULL;
1578}
1579
1580size_t gossmap_num_chans(const struct gossmap *map)
1581{

Callers 1

get_random_nodeFunction · 0.85

Calls 1

ptrint2nodeFunction · 0.85

Tested by

no test coverage detected