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

Function delete_node_from_db

plugins/sql.c:1164–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164static void delete_node_from_db(struct command *cmd,
1165 const struct node_id *id)
1166{
1167 struct sql *sql = sql_of(cmd->plugin);
1168 int err;
1169 char *errmsg;
1170
1171 err = sqlite3_exec(sql->db,
1172 tal_fmt(tmpctx,
1173 "DELETE FROM nodes"
1174 " WHERE nodeid = X'%s'",
1175 fmt_node_id(tmpctx, id)),
1176 NULL, NULL, &errmsg);
1177 if (err != SQLITE_OK)
1178 plugin_err(cmd->plugin, "Could not delete from nodes: %s",
1179 errmsg);
1180}
1181
1182static bool extract_node_id(int gosstore_fd, size_t off, u16 type,
1183 struct node_id *id)

Callers 1

nodes_refreshFunction · 0.85

Calls 3

sql_ofFunction · 0.85
fmt_node_idFunction · 0.85
plugin_errFunction · 0.70

Tested by

no test coverage detected