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

Function gossmap_remove_chan

common/gossmap.c:420–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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