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

Function invoices_delete_description

wallet/invoices.c:474–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474bool invoices_delete_description(struct invoices *invoices, u64 inv_dbid,
475 const struct json_escape *label,
476 const char *description)
477{
478 struct db_stmt *stmt;
479 int changes;
480
481 stmt = db_prepare_v2(invoices->wallet->db,
482 SQL("UPDATE invoices"
483 " SET description = NULL,"
484 " updated_index = ?"
485 " WHERE ID = ?;"));
486 db_bind_u64(stmt,
487 invoice_index_update_deldesc(invoices->wallet->ld,
488 label, description));
489 db_bind_u64(stmt, inv_dbid);
490 db_exec_prepared_v2(stmt);
491
492 changes = db_count_changes(stmt);
493 tal_free(stmt);
494
495 return changes == 1;
496}
497
498struct db_stmt *invoices_first(struct invoices *invoices,
499 const enum wait_index *listindex,

Callers

nothing calls this directly

Calls 5

db_bind_u64Function · 0.85
db_exec_prepared_v2Function · 0.85
db_count_changesFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected