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

Function destroy_map

common/gossmap.c:977–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

975}
976
977static void destroy_map(struct gossmap *map)
978{
979 if (map->mmap)
980 munmap(map->mmap, map->map_size);
981
982 for (size_t i = 0; i < tal_count(map->node_arr); i++)
983 free(map->node_arr[i].chan_idxs);
984
985 close(map->fd);
986}
987
988/* Local modifications. We only expect a few, so we use a simple
989 * array. If this changes, use a hashtable and a storage area for all

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected