mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
fix: 5072 follow-ups (#5197)
## Issue being fixed or feature implemented fixing a few trivial issues we missed while reviewing #5072 ## What was done? see code ## How Has This Been Tested? tests are ✅ locally ## Breaking Changes n/a ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
This commit is contained in:
parent
2b61dd8673
commit
cf0ec1c32c
@ -228,7 +228,7 @@ void SQLiteDatabase::Open()
|
||||
// Now begin a transaction to acquire the exclusive lock. This lock won't be released until we close because of the exclusive locking mode.
|
||||
int ret = sqlite3_exec(m_db, "BEGIN EXCLUSIVE TRANSACTION", nullptr, nullptr, nullptr);
|
||||
if (ret != SQLITE_OK) {
|
||||
throw std::runtime_error("SQLiteDatabase: Unable to obtain an exclusive lock on the database, is it being used by another bitcoind?\n");
|
||||
throw std::runtime_error("SQLiteDatabase: Unable to obtain an exclusive lock on the database, is it being used by another dashd?\n");
|
||||
}
|
||||
ret = sqlite3_exec(m_db, "COMMIT", nullptr, nullptr, nullptr);
|
||||
if (ret != SQLITE_OK) {
|
||||
|
@ -4768,7 +4768,7 @@ bool CWallet::AutoBackupWallet(const fs::path& wallet_path, bilingual_str& error
|
||||
|
||||
return true;
|
||||
}
|
||||
#elif USE_SQLITE
|
||||
#elif defined(USE_SQLITE)
|
||||
bool CWallet::AutoBackupWallet(const fs::path& wallet_path, bilingual_str& error_string, std::vector<bilingual_str>& warnings)
|
||||
{
|
||||
WalletLogPrintf("Automatic wallet backups are currently only supported with Berkeley DB!\n");
|
||||
|
@ -907,7 +907,7 @@ std::unique_ptr<WalletDatabase> CreateMockWalletDatabase()
|
||||
{
|
||||
#ifdef USE_BDB
|
||||
return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), "");
|
||||
#elif USE_SQLITE
|
||||
#elif defined(USE_SQLITE)
|
||||
return std::make_unique<SQLiteDatabase>("", "", true);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user