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

Function reopen_store

common/gossmap.c:589–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589static void reopen_store(struct gossmap *map, size_t ended_off)
590{
591 int fd = open(map->fname, O_RDONLY);
592
593 if (fd < 0)
594 err(1, "Failed to reopen %s", map->fname);
595
596 /* This tells us the equivalent offset in new map */
597 map->map_end = map_be64(map, ended_off + 2);
598
599 close(map->fd);
600 map->fd = fd;
601 gossmap_refresh(map, NULL);
602}
603
604static bool map_catchup(struct gossmap *map, size_t *num_rejected)
605{

Callers 1

map_catchupFunction · 0.85

Calls 3

errFunction · 0.85
map_be64Function · 0.85
gossmap_refreshFunction · 0.85

Tested by

no test coverage detected