From f3d870fc2271bf45e0269e5ae135bced1a26f620 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 30 Oct 2020 16:48:04 -0400 Subject: [PATCH] wallet: List all wallets in non-SQLite or non-BDB builds This commit does not change behavior when bitcoin is built normally with both the SQLite and BDB libraries. It just makes non-SQLite and non-BDB builds more similar to the normal build. Specifically: - It makes wallet directory lists always include all wallets so wallets don't appear missing depending on the build. - It now triggers specific "Build does not support SQLite database format" and "Build does not support Berkeley DB database format" errors if a wallet can't be loaded instead of the more ambiguous and scary "Data is not in recognized format" error. --- src/wallet/db.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 425b14b8f9f..cd49baeb786 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -74,10 +74,6 @@ fs::path SQLiteDataFile(const fs::path& path) bool IsBDBFile(const fs::path& path) { -#ifndef USE_BDB - return false; -#endif - if (!fs::exists(path)) return false; // A Berkeley DB Btree file has at least 4K. @@ -103,10 +99,6 @@ bool IsBDBFile(const fs::path& path) bool IsSQLiteFile(const fs::path& path) { -#ifndef USE_SQLITE - return false; -#endif - if (!fs::exists(path)) return false; // A SQLite Database file is at least 512 bytes.