| 348 | |
| 349 | |
| 350 | static 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 | |
| 365 | struct node *get_node(struct routing_state *rstate, |
| 366 | const struct node_id *id) |
nothing calls this directly
no test coverage detected