Skip to content

Commit f3d870f

Browse files
committed
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.
1 parent d70dc89 commit f3d870f

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/wallet/db.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ fs::path SQLiteDataFile(const fs::path& path)
7474

7575
bool IsBDBFile(const fs::path& path)
7676
{
77-
#ifndef USE_BDB
78-
return false;
79-
#endif
80-
8177
if (!fs::exists(path)) return false;
8278

8379
// A Berkeley DB Btree file has at least 4K.
@@ -103,10 +99,6 @@ bool IsBDBFile(const fs::path& path)
10399

104100
bool IsSQLiteFile(const fs::path& path)
105101
{
106-
#ifndef USE_SQLITE
107-
return false;
108-
#endif
109-
110102
if (!fs::exists(path)) return false;
111103

112104
// A SQLite Database file is at least 512 bytes.

0 commit comments

Comments
 (0)