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

Function gossmap_remove_chan

common/gossmap.c:386–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386void gossmap_remove_chan(struct gossmap *map, struct gossmap_chan *chan)
387{
388 u32 chanidx = gossmap_chan_idx(map, chan);
389 if (!chanidx_htable_del(&map->channels, chan2ptrint(chan)))
390 abort();
391 remove_chan_from_node(map, gossmap_nth_node(map, chan, 0), chanidx);
392 remove_chan_from_node(map, gossmap_nth_node(map, chan, 1), chanidx);
393 chan->cann_off = map->freed_chans;
394 chan->plus_scid_off = 0;
395 map->freed_chans = chanidx;
396}
397
398void gossmap_remove_node(struct gossmap *map, struct gossmap_node *node)
399{

Callers 5

gossmap_remove_nodeFunction · 0.85
add_channelFunction · 0.85
gossmap_remove_localmodsFunction · 0.85
clean_topoFunction · 0.85

Calls 5

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

Tested by

no test coverage detected