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

Function wallet_datastore_save_payment_description

wallet/wallet.c:6385–6396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6383}
6384
6385void wallet_datastore_save_payment_description(struct db *db,
6386 const struct sha256 *payment_hash,
6387 const char *desc)
6388{
6389 const char **key = mkdatastorekey(tmpctx,
6390 "bookkeeper", "description", "payment",
6391 take(fmt_sha256(NULL, payment_hash)));
6392
6393 /* In case it's a duplicate, remove first */
6394 db_datastore_remove(db, key);
6395 db_datastore_create(db, key, tal_dup_arr(key, u8, (u8 *)desc, strlen(desc), 0));
6396}
6397
6398void wallet_datastore_remove(struct wallet *w, const char **key)
6399{

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