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

Function replicate_statement

db/db_sqlite3.c:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static void replicate_statement(const struct db *db,
30 struct db_sqlite3 *wrapper,
31 const char *qry)
32{
33 sqlite3_stmt *stmt;
34 int err;
35
36 if (!wrapper->backup_conn)
37 return;
38
39 sqlite3_prepare_v2(wrapper->backup_conn,
40 qry, -1, &stmt, NULL);
41 err = sqlite3_step(stmt);
42 sqlite3_finalize(stmt);
43
44 if (err != SQLITE_DONE)
45 db_fatal(db, "Failed to replicate query: %s: %s: %s",
46 sqlite3_errstr(err),
47 sqlite3_errmsg(wrapper->backup_conn),
48 qry);
49}
50
51static void db_sqlite3_changes_add(struct db_sqlite3 *wrapper,
52 struct db_stmt *stmt,

Callers 4

db_sqlite3_changes_addFunction · 0.85
db_sqlite3_begin_txFunction · 0.85
db_sqlite3_commit_txFunction · 0.85
db_sqlite3_vacuumFunction · 0.85

Calls 1

db_fatalFunction · 0.85

Tested by

no test coverage detected