0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

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.
This commit is contained in:
Russell Yanofsky 2020-10-30 16:48:04 -04:00
parent d70dc89e78
commit f3d870fc22

View file

@ -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.