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

Function compactd_read_done

gossipd/gossmap_manage.c:1742–1754  ·  view source on GitHub ↗

When it's caught up to where we were, we wait. */

Source from the content-addressed store, hash-verified

1740
1741/* When it's caught up to where we were, we wait. */
1742static struct io_plan *compactd_read_done(struct io_conn *conn,
1743 struct gossmap_manage *gm)
1744{
1745 status_debug("compactd caught up, waiting for final bytes.");
1746
1747 /* Make sure everything has hit storage in the current version. */
1748 gossip_store_fsync(gm->gs);
1749 gossmap_manage_get_gossmap(gm);
1750
1751 /* Tell it to do the remainder, then we wait for it to exit in destructor. */
1752 write_all(gm->compactd->outfd, "", 1);
1753 return io_close(conn);
1754}
1755
1756static struct io_plan *init_compactd_conn_in(struct io_conn *conn,
1757 struct gossmap_manage *gm)

Callers

nothing calls this directly

Calls 4

gossip_store_fsyncFunction · 0.85
io_closeFunction · 0.85
write_allFunction · 0.50

Tested by

no test coverage detected