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

Function channel_spent

gossipd/routing.c:2102–2116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100}
2101
2102static void channel_spent(struct routing_state *rstate,
2103 struct chan *chan STEALS)
2104{
2105 status_debug("Deleting channel %s due to the funding outpoint being "
2106 "spent",
2107 type_to_string(tmpctx, struct short_channel_id,
2108 &chan->scid));
2109 /* Suppress any now-obsolete updates/announcements */
2110 add_to_txout_failures(rstate, &chan->scid);
2111 remove_channel_from_store(rstate, chan);
2112 /* Freeing is sufficient since everything else is allocated off
2113 * of the channel and this takes care of unregistering
2114 * the channel */
2115 free_chan(rstate, chan);
2116}
2117
2118void routing_expire_channels(struct routing_state *rstate, u32 blockheight)
2119{

Callers 2

routing_expire_channelsFunction · 0.85
routing_channel_spentFunction · 0.85

Calls 4

add_to_txout_failuresFunction · 0.85
free_chanFunction · 0.85
type_to_stringClass · 0.50

Tested by

no test coverage detected