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

Function refresh_by_created_index

plugins/sql.c:1742–1759  ·  view source on GitHub ↗

The simplest case: append-only lists */

Source from the content-addressed store, hash-verified

1740
1741/* The simplest case: append-only lists */
1742static struct command_result *refresh_by_created_index(struct command *cmd,
1743 struct table_desc *td,
1744 struct db_query *dbq)
1745{
1746 struct sql *sql = sql_of(dbq->cmd->plugin);
1747 struct out_req *req;
1748
1749 /* We no longer need refresh_created, but wait could update this meanwhile. */
1750 td->refresh_needs &= ~REFRESH_CREATED;
1751
1752 req = jsonrpc_request_start(cmd, td->cmdname,
1753 limited_list_done, forward_error,
1754 dbq);
1755 json_add_string(req->js, "index", "created");
1756 json_add_u64(req->js, "start", td->last_created_index + 1);
1757 json_add_u64(req->js, "limit", sql->limit_per_list);
1758 return send_outreq(req);
1759}
1760
1761static struct command_result *updated_list_done(struct command *cmd,
1762 const char *method,

Callers 2

updated_list_doneFunction · 0.85
paginated_refreshFunction · 0.85

Calls 4

sql_ofFunction · 0.85
json_add_u64Function · 0.85
send_outreqFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected