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

Function gossmap_chan_byidx

common/gossmap.c:219–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219struct gossmap_chan *gossmap_chan_byidx(const struct gossmap *map, u32 idx)
220{
221 assert(idx < gossmap_max_chan_idx(map));
222
223 if (map->chan_arr[idx].plus_scid_off == 0)
224 return NULL;
225 return &map->chan_arr[idx];
226}
227
228/* htable can't handle NULL or 1 values, so we add 2 */
229static struct gossmap_chan *ptrint2chan(const ptrint_t *pidx)

Callers 3

gather_rangeFunction · 0.85
prune_networkFunction · 0.85
get_flow_singlepathFunction · 0.85

Calls 1

gossmap_max_chan_idxFunction · 0.85

Tested by

no test coverage detected