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

Function gossmap_remove_chan

common/gossmap.c:417–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417void gossmap_remove_chan(struct gossmap *map, struct gossmap_chan *chan)
418{
419 u32 chanidx = gossmap_chan_idx(map, chan);
420 if (!chanidx_htable_del(map->channels, chan2ptrint(chan)))
421 abort();
422 remove_chan_from_node(map, gossmap_nth_node(map, chan, 0), chanidx);
423 remove_chan_from_node(map, gossmap_nth_node(map, chan, 1), chanidx);
424 chan->cann_off = map->freed_chans;
425 chan->plus_scid_off = 0;
426 map->freed_chans = chanidx;
427 map->num_live--;
428 map->num_dead++;
429}
430
431void gossmap_remove_node(struct gossmap *map, struct gossmap_node *node)
432{

Callers 4

gossmap_remove_nodeFunction · 0.85
gossmap_remove_localmodsFunction · 0.85
clean_topoFunction · 0.85

Calls 5

gossmap_chan_idxFunction · 0.85
chan2ptrintFunction · 0.85
abortFunction · 0.85
remove_chan_from_nodeFunction · 0.85
gossmap_nth_nodeFunction · 0.85

Tested by

no test coverage detected