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

Function db_begin_transaction_

db/exec.c:121–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void db_begin_transaction_(struct db *db, const char *location)
122{
123 bool ok;
124 if (db->in_transaction)
125 db_fatal("Already in transaction from %s", db->in_transaction);
126
127 /* No writes yet. */
128 db->dirty = false;
129
130 db_prepare_for_changes(db);
131 ok = db->config->begin_tx_fn(db);
132 if (!ok)
133 db_fatal("Failed to start DB transaction: %s", db->error);
134
135 db->in_transaction = location;
136}
137
138bool db_in_transaction(struct db *db)
139{

Callers

nothing calls this directly

Calls 2

db_prepare_for_changesFunction · 0.85
db_fatalFunction · 0.50

Tested by

no test coverage detected