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:
UdjinM6 2023-02-13 05:12:53 +03:00 committed by GitHub
parent 2b61dd8673
commit cf0ec1c32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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. // 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); int ret = sqlite3_exec(m_db, "BEGIN EXCLUSIVE TRANSACTION", nullptr, nullptr, nullptr);
if (ret != SQLITE_OK) { 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); ret = sqlite3_exec(m_db, "COMMIT", nullptr, nullptr, nullptr);
if (ret != SQLITE_OK) { if (ret != SQLITE_OK) {

View File

@ -4768,7 +4768,7 @@ bool CWallet::AutoBackupWallet(const fs::path& wallet_path, bilingual_str& error
return true; 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) 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"); WalletLogPrintf("Automatic wallet backups are currently only supported with Berkeley DB!\n");

View File

@ -907,7 +907,7 @@ std::unique_ptr<WalletDatabase> CreateMockWalletDatabase()
{ {
#ifdef USE_BDB #ifdef USE_BDB
return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), ""); return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), "");
#elif USE_SQLITE #elif defined(USE_SQLITE)
return std::make_unique<SQLiteDatabase>("", "", true); return std::make_unique<SQLiteDatabase>("", "", true);
#endif #endif
} }