mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds
f3d870fc22wallet: List all wallets in non-SQLite or non-BDB builds (Russell Yanofsky)d70dc89e78refactor: Consolidate redundant wallet database path and exists functions (Russell Yanofsky)6a7a63644crefactor: Drop call to GetWalletEnv in wallet salvage code (Russell Yanofsky)6ee9cbdd18refactor: Replace ListWalletDir() function with ListDatabases() (Russell Yanofsky)5aaeb6cf87MOVEONLY: Move IsBDBFile, IsSQLiteFile, and ListWalletDir (Russell Yanofsky) Pull request description: This PR 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. Both changes are implemented in the last commit. The previous commits are just refactoring cleanups that make the last commit possible and consolidate and reduce code. ACKs for top commit: achow101: ACKf3d870fc22promag: Tested ACKf3d870fc22. Tested a --without-sqlite build with sqlite wallets. Tree-SHA512: 029ad21559dbc338b5f351d05113c51bc25bce830f4f4e18bcd82287bc528275347a60249da65b91d252632aeb70b25d057bd59c704bfcaafb9f790bc5b59762
This commit is contained in:
@@ -551,7 +551,7 @@ public:
|
||||
std::vector<std::string> listWalletDir() override
|
||||
{
|
||||
std::vector<std::string> paths;
|
||||
for (auto& path : ListWalletDir()) {
|
||||
for (auto& path : ListDatabases(GetWalletDir())) {
|
||||
paths.push_back(path.string());
|
||||
}
|
||||
return paths;
|
||||
|
||||
Reference in New Issue
Block a user