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

Function gossmap_random_node

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

Source from the content-addressed store, hash-verified

1564}
1565
1566struct gossmap_node *gossmap_random_node(const struct gossmap *map)
1567{
1568 ptrint_t *pi = nodeidx_htable_pick(map->nodes, pseudorand_u64(), NULL);
1569 if (pi)
1570 return ptrint2node(pi);
1571 return NULL;
1572}
1573
1574size_t gossmap_num_chans(const struct gossmap *map)
1575{

Callers 1

get_random_nodeFunction · 0.85

Calls 1

ptrint2nodeFunction · 0.85

Tested by

no test coverage detected