From cf0ec1c32c771d4d8a58bcb89b38957894774043 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 13 Feb 2023 05:12:53 +0300 Subject: [PATCH] fix: 5072 follow-ups (#5197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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: - [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 --- src/wallet/sqlite.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/walletdb.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp index 815d17967c..23e55d376c 100644 --- a/src/wallet/sqlite.cpp +++ b/src/wallet/sqlite.cpp @@ -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) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3544b7e639..907bcfa930 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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& warnings) { WalletLogPrintf("Automatic wallet backups are currently only supported with Berkeley DB!\n"); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 8be542085f..fcddef2ddb 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -907,7 +907,7 @@ std::unique_ptr CreateMockWalletDatabase() { #ifdef USE_BDB return std::make_unique(std::make_shared(), ""); -#elif USE_SQLITE +#elif defined(USE_SQLITE) return std::make_unique("", "", true); #endif }