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

Function updated_list_done

plugins/sql.c:1761–1785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1759}
1760
1761static struct command_result *updated_list_done(struct command *cmd,
1762 const char *method,
1763 const char *buf,
1764 const jsmntok_t *result,
1765 struct db_query *dbq)
1766{
1767 struct table_desc *td = dbq->tables[0];
1768 struct command_result *ret;
1769 u64 unused = 0;
1770
1771 /* We don't care what max created_index it processes. */
1772 ret = process_json_result(cmd, buf, result, td, true, &unused, &td->last_updated_index,
1773 NULL);
1774 if (ret)
1775 return ret;
1776
1777 /* Now we can process any new ones */
1778 if (td->refresh_needs & REFRESH_CREATED) {
1779 plugin_log(cmd->plugin, LOG_DBG,
1780 "%s: records created, inserting from %"PRIu64, td->name, td->last_created_index + 1);
1781 return refresh_by_created_index(cmd, td, dbq);
1782 }
1783
1784 return one_refresh_done(cmd, dbq, false);
1785}
1786
1787static struct command_result *paginated_refresh(struct command *cmd,
1788 struct table_desc *td,

Callers

nothing calls this directly

Calls 4

process_json_resultFunction · 0.85
refresh_by_created_indexFunction · 0.85
one_refresh_doneFunction · 0.85
plugin_logFunction · 0.70

Tested by

no test coverage detected