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

Function free_chans_from_node

gossipd/routing.c:534–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532#endif
533
534static void free_chans_from_node(struct routing_state *rstate, struct chan *chan)
535{
536 remove_chan_from_node(rstate, chan->nodes[0], chan);
537 remove_chan_from_node(rstate, chan->nodes[1], chan);
538
539#if DEVELOPER
540 chan->sat.satoshis = (unsigned long)chan; /* Raw: dev-hack */
541#endif
542}
543
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. */

Callers 2

free_chanFunction · 0.85

Calls 1

remove_chan_from_nodeFunction · 0.70

Tested by

no test coverage detected