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

Function test_empty_db_migrate

wallet/test/run-db.c:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static bool test_empty_db_migrate(struct lightningd *ld)
95{
96 struct db *db = create_test_db();
97 const struct ext_key *bip32_base = NULL;
98 CHECK(db);
99 db_begin_transaction(db);
100 CHECK(db_get_version(db) == -1);
101 db_migrate(ld, db, bip32_base);
102 db_commit_transaction(db);
103
104 db_begin_transaction(db);
105 CHECK(db_get_version(db) == ARRAY_SIZE(dbmigrations) - 1);
106 db_commit_transaction(db);
107
108 tal_free(db);
109 return true;
110}
111
112static bool test_primitives(void)
113{

Callers 1

mainFunction · 0.85

Calls 5

db_get_versionFunction · 0.85
tal_freeFunction · 0.85
create_test_dbFunction · 0.70
db_migrateFunction · 0.50
db_commit_transactionFunction · 0.50

Tested by

no test coverage detected