| 461 | } |
| 462 | |
| 463 | void load_indexes(struct db *db, struct indexes *indexes) |
| 464 | { |
| 465 | for (size_t s = 0; s < NUM_WAIT_SUBSYSTEM; s++) { |
| 466 | for (size_t i = 0; i < NUM_WAIT_INDEX; i++) { |
| 467 | const char *fname = tal_fmt(tmpctx, "last_%s_%s_index", |
| 468 | wait_subsystem_name(s), |
| 469 | wait_index_name(i)); |
| 470 | indexes[s].i[i] = db_get_intvar(db, fname, 0); |
| 471 | } |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | /* We're moving everything over to PSBTs from tx's, particularly our last_tx's |
| 476 | * which are commitment transactions for channels. |