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

Function db_commit_transaction

db/exec.c:143–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void db_commit_transaction(struct db *db)
144{
145 bool ok;
146 assert(db->in_transaction);
147 db_assert_no_outstanding_statements(db);
148
149 /* Increment before reporting changes to an eventual plugin. */
150 if (db->dirty)
151 db_data_version_incr(db);
152
153 db_report_changes(db, NULL, 0);
154 ok = db->config->commit_tx_fn(db);
155
156 if (!ok)
157 db_fatal("Failed to commit DB transaction: %s", db->error);
158
159 db->in_transaction = NULL;
160 db->dirty = false;
161}

Callers 15

prepare_table_manipFunction · 0.70
complete_table_manipFunction · 0.70
db_get_versionFunction · 0.70
db_setupFunction · 0.50
wallet_newFunction · 0.50
test_empty_db_migrateFunction · 0.50
test_primitivesFunction · 0.50
test_varsFunction · 0.50
test_manip_columnsFunction · 0.50
create_test_walletFunction · 0.50
test_wallet_outputsFunction · 0.50
test_shachain_crudFunction · 0.50

Calls 4

db_data_version_incrFunction · 0.85
db_report_changesFunction · 0.85
db_fatalFunction · 0.50

Tested by 15

test_empty_db_migrateFunction · 0.40
test_primitivesFunction · 0.40
test_varsFunction · 0.40
test_manip_columnsFunction · 0.40
create_test_walletFunction · 0.40
test_wallet_outputsFunction · 0.40
test_shachain_crudFunction · 0.40
test_channel_crudFunction · 0.40
test_htlc_crudFunction · 0.40
test_payment_crudFunction · 0.40