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

Function destroy_node

gossipd/routing.c:350–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348
349
350static void destroy_node(struct node *node, struct routing_state *rstate)
351{
352 struct chan_map_iter i;
353 struct chan *c;
354 node_map_del(rstate->nodes, node);
355
356 /* These remove themselves from chans[]. */
357 while ((c = first_chan(node, &i)) != NULL)
358 free_chan(rstate, c);
359
360 /* Free htable if we need. */
361 if (node_uses_chan_map(node))
362 chan_map_clear(&node->chans.map);
363}
364
365struct node *get_node(struct routing_state *rstate,
366 const struct node_id *id)

Callers

nothing calls this directly

Calls 3

first_chanFunction · 0.85
free_chanFunction · 0.85
node_uses_chan_mapFunction · 0.85

Tested by

no test coverage detected