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

Function wallet_datastore_save_payment_description

wallet/wallet.c:6422–6433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6420}
6421
6422void wallet_datastore_save_payment_description(struct db *db,
6423 const struct sha256 *payment_hash,
6424 const char *desc)
6425{
6426 const char **key = mkdatastorekey(tmpctx,
6427 "bookkeeper", "description", "payment",
6428 take(fmt_sha256(NULL, payment_hash)));
6429
6430 /* In case it's a duplicate, remove first */
6431 db_datastore_remove(db, key);
6432 db_datastore_create(db, key, tal_dup_arr(key, u8, (u8 *)desc, strlen(desc), 0));
6433}
6434
6435void wallet_datastore_remove(struct wallet *w, const char **key)
6436{

Callers 1

migrate_from_account_dbFunction · 0.85

Calls 3

fmt_sha256Function · 0.85
db_datastore_removeFunction · 0.85
db_datastore_createFunction · 0.85

Tested by

no test coverage detected