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

Function free_chan

gossipd/routing.c:546–552  ·  view source on GitHub ↗

We used to make this a tal_add_destructor2, but that costs 40 bytes per * chan, and we only ever explicitly free it anyway. */

Source from the content-addressed store, hash-verified

544/* We used to make this a tal_add_destructor2, but that costs 40 bytes per
545 * chan, and we only ever explicitly free it anyway. */
546void free_chan(struct routing_state *rstate, struct chan *chan)
547{
548 free_chans_from_node(rstate, chan);
549 uintmap_del(&rstate->chanmap, chan->scid.u64);
550
551 tal_free(chan);
552}
553
554static void init_half_chan(struct routing_state *rstate,
555 struct chan *chan,

Callers 4

destroy_routing_stateFunction · 0.85
destroy_nodeFunction · 0.85
route_pruneFunction · 0.85
channel_spentFunction · 0.85

Calls 2

free_chans_from_nodeFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected