refactor: Replace ListWalletDir() function with ListDatabases()

No change to behavior. This is just cleanup after previous MOVEONLY commit to
make db.h list function fit conventions of surrounding functions.
This commit is contained in:
Russell Yanofsky
2020-10-30 16:25:56 -04:00
parent 5aaeb6cf87
commit 6ee9cbdd18
5 changed files with 6 additions and 9 deletions

View File

@@ -10,8 +10,6 @@
#include <string>
fs::path GetWalletDir();
#ifdef USE_BDB
bool ExistsBerkeleyDatabase(const fs::path& path);
#else
@@ -23,9 +21,8 @@ bool ExistsSQLiteDatabase(const fs::path& path);
# define ExistsSQLiteDatabase(path) (false)
#endif
std::vector<fs::path> ListWalletDir()
std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
{
const fs::path wallet_dir = GetWalletDir();
const size_t offset = wallet_dir.string().size() + 1;
std::vector<fs::path> paths;
boost::system::error_code ec;