| 587 | } |
| 588 | |
| 589 | static 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 | |
| 604 | static bool map_catchup(struct gossmap *map, size_t *num_rejected) |
| 605 | { |
no test coverage detected