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

Function destroy_routing_state

gossipd/routing.c:200–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200static 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 */

Callers

nothing calls this directly

Calls 1

free_chanFunction · 0.85

Tested by

no test coverage detected