| 198 | } |
| 199 | |
| 200 | static void destroy_routing_state(struct routing_state *rstate) |
| 201 | { |
| 202 | /* Since we omitted destructors on these, clean up manually */ |
| 203 | u64 idx; |
| 204 | for (struct chan *chan = uintmap_first(&rstate->chanmap, &idx); |
| 205 | chan; |
| 206 | chan = uintmap_after(&rstate->chanmap, &idx)) |
| 207 | free_chan(rstate, chan); |
| 208 | |
| 209 | /* Free up our htables */ |
| 210 | pending_cannouncement_map_clear(&rstate->pending_cannouncements); |
| 211 | } |
| 212 | |
| 213 | /* We don't check this when loading from the gossip_store: that would break |
| 214 | * our canned tests, and usually old gossip is better than no gossip */ |
nothing calls this directly
no test coverage detected