| 629 | } |
| 630 | |
| 631 | void add_payment_hash_desc(struct db *db, |
| 632 | struct sha256 *payment_hash, |
| 633 | const char *desc) |
| 634 | { |
| 635 | struct db_stmt *stmt; |
| 636 | |
| 637 | /* Ok, now we update the account with this blockheight */ |
| 638 | stmt = db_prepare_v2(db, SQL("UPDATE channel_events SET" |
| 639 | " ev_desc = ?" |
| 640 | " WHERE" |
| 641 | " payment_id = ?")); |
| 642 | db_bind_text(stmt, 0, desc); |
| 643 | db_bind_sha256(stmt, 1, payment_hash); |
| 644 | db_exec_prepared_v2(take(stmt)); |
| 645 | |
| 646 | /* Ok, now we update the account with this blockheight */ |
| 647 | stmt = db_prepare_v2(db, SQL("UPDATE chain_events SET" |
| 648 | " ev_desc = ?" |
| 649 | " WHERE" |
| 650 | " payment_id = ?")); |
| 651 | db_bind_text(stmt, 0, desc); |
| 652 | db_bind_sha256(stmt, 1, payment_hash); |
| 653 | db_exec_prepared_v2(take(stmt)); |
| 654 | } |
| 655 | |
| 656 | struct chain_event *find_chain_event_by_id(const tal_t *ctx, |
| 657 | struct db *db, |
no test coverage detected