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

Function wallet_datastore_update

wallet/wallet.c:5165–5174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5163}
5164
5165void wallet_datastore_update(struct wallet *w, const char **key, const u8 *data)
5166{
5167 struct db_stmt *stmt;
5168
5169 stmt = db_prepare_v2(w->db,
5170 SQL("UPDATE datastore SET data=?, generation=generation+1 WHERE key=?;"));
5171 db_bind_talarr(stmt, 0, data);
5172 db_bind_datastore_key(stmt, 1, key);
5173 db_exec_prepared_v2(take(stmt));
5174}
5175
5176void wallet_datastore_create(struct wallet *w, const char **key, const u8 *data)
5177{

Callers 1

json_datastoreFunction · 0.85

Calls 3

db_bind_talarrFunction · 0.85
db_bind_datastore_keyFunction · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected