| 1528 | } |
| 1529 | |
| 1530 | static void set_max_channel_dbid(struct wallet *w) |
| 1531 | { |
| 1532 | struct db_stmt *stmt; |
| 1533 | |
| 1534 | stmt = db_prepare_v2(w->db, SQL("SELECT id FROM channels ORDER BY id DESC LIMIT 1;")); |
| 1535 | db_query_prepared(stmt); |
| 1536 | w->max_channel_dbid = 0; |
| 1537 | |
| 1538 | if (db_step(stmt)) |
| 1539 | w->max_channel_dbid = db_col_u64(stmt, "id"); |
| 1540 | |
| 1541 | tal_free(stmt); |
| 1542 | } |
| 1543 | |
| 1544 | static bool wallet_channels_load_active(struct wallet *w) |
| 1545 | { |
no test coverage detected