mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
wallet: Enforce sqlite serialized threading mode
This commit is contained in:
parent
6173269866
commit
f023b7cac0
1 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,11 @@ SQLiteDatabase::SQLiteDatabase(const fs::path& dir_path, const fs::path& file_pa
|
|||
if (ret != SQLITE_OK) {
|
||||
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to setup error log: %s\n", sqlite3_errstr(ret)));
|
||||
}
|
||||
// Force serialized threading mode
|
||||
ret = sqlite3_config(SQLITE_CONFIG_SERIALIZED);
|
||||
if (ret != SQLITE_OK) {
|
||||
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to configure serialized threading mode: %s\n", sqlite3_errstr(ret)));
|
||||
}
|
||||
}
|
||||
int ret = sqlite3_initialize(); // This is a no-op if sqlite3 is already initialized
|
||||
if (ret != SQLITE_OK) {
|
||||
|
|
Loading…
Add table
Reference in a new issue