| 2567 | } |
| 2568 | |
| 2569 | static void wallet_channel_config_insert(struct wallet *w, |
| 2570 | struct channel_config *cc) |
| 2571 | { |
| 2572 | struct db_stmt *stmt; |
| 2573 | |
| 2574 | assert(cc->id == 0); |
| 2575 | |
| 2576 | stmt = db_prepare_v2(w->db, SQL("INSERT INTO channel_configs DEFAULT VALUES;")); |
| 2577 | db_exec_prepared_v2(stmt); |
| 2578 | cc->id = db_last_insert_id_v2(stmt); |
| 2579 | tal_free(stmt); |
| 2580 | } |
| 2581 | |
| 2582 | static void wallet_channel_config_save(struct wallet *w, |
| 2583 | const struct channel_config *cc) |