diff --git a/gossipd/gossip_store.c b/gossipd/gossip_store.c index 2c358bece..92d8d732e 100644 --- a/gossipd/gossip_store.c +++ b/gossipd/gossip_store.c @@ -199,8 +199,7 @@ static u8 *new_uuid_record(const tal_t *ctx, int fd, u64 *off) */ static int gossip_store_compact(struct daemon *daemon, u64 *total_len, - bool *populated, - struct chan_dying **dying) + bool *populated) { size_t cannounces = 0, cupdates = 0, nannounces = 0, deleted = 0; int old_fd, new_fd; @@ -324,20 +323,6 @@ static int gossip_store_compact(struct daemon *daemon, case WIRE_CHANNEL_ANNOUNCEMENT: cannounces++; break; - case WIRE_GOSSIP_STORE_CHAN_DYING: { - struct chan_dying cd; - - if (!fromwire_gossip_store_chan_dying(msg, - &cd.scid, - &cd.deadline)) { - bad = "Bad gossip_store_chan_dying"; - goto badmsg; - } - /* By convention, these offsets are *after* header */ - cd.gossmap_offset = *total_len + sizeof(hdr); - tal_arr_expand(dying, cd); - break; - } case WIRE_CHANNEL_UPDATE: cupdates++; break; @@ -421,14 +406,12 @@ void gossip_store_corrupt(void) struct gossip_store *gossip_store_new(const tal_t *ctx, struct daemon *daemon, - bool *populated, - struct chan_dying **dying) + bool *populated) { struct gossip_store *gs = tal(ctx, struct gossip_store); gs->daemon = daemon; - *dying = tal_arr(ctx, struct chan_dying, 0); - gs->fd = gossip_store_compact(daemon, &gs->len, populated, dying); + gs->fd = gossip_store_compact(daemon, &gs->len, populated); if (gs->fd < 0) return tal_free(gs); tal_add_destructor(gs, gossip_store_destroy); diff --git a/gossipd/gossip_store.h b/gossipd/gossip_store.h index 853b772d7..5d8391692 100644 --- a/gossipd/gossip_store.h +++ b/gossipd/gossip_store.h @@ -27,14 +27,12 @@ struct chan_dying { * @ctx: the context to allocate from * @daemon: the daemon context * @populated: set to false if store is empty/obviously partial. - * @dying: an array of channels we found dying markers for. * * Returns NULL on error. */ struct gossip_store *gossip_store_new(const tal_t *ctx, struct daemon *daemon, - bool *populated, - struct chan_dying **dying); + bool *populated); /** * Move the old gossip store out the way. Log a broken message about it. diff --git a/gossipd/gossmap_manage.c b/gossipd/gossmap_manage.c index 6260673ab..5aa97c96a 100644 --- a/gossipd/gossmap_manage.c +++ b/gossipd/gossmap_manage.c @@ -459,7 +459,6 @@ static bool setup_gossmap(struct gossmap_manage *gm, struct daemon *daemon) { u64 expected_len; - struct chan_dying *dying = NULL; gm->dying_channels = tal_arr(gm, struct chan_dying, 0); @@ -467,13 +466,10 @@ static bool setup_gossmap(struct gossmap_manage *gm, * necessary */ gm->gs = gossip_store_new(gm, daemon, - &gm->gossip_store_populated, - &dying); + &gm->gossip_store_populated); if (!gm->gs) return false; - /* FIXME: Remove */ - tal_free(dying); expected_len = gossip_store_len_written(gm->gs); /* This actually loads it into memory, with strict checks. */