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

Function load_indexes

wallet/db.c:463–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463void 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.

Callers 3

migrate_from_account_dbFunction · 0.85
wallet_newFunction · 0.85
test_payment_crudFunction · 0.85

Calls 3

wait_subsystem_nameFunction · 0.50
wait_index_nameFunction · 0.50
db_get_intvarFunction · 0.50

Tested by 1

test_payment_crudFunction · 0.68