wallet: Remove path checking code from bitcoin-wallet tool

This commit does not change behavior except for error messages which now
include more complete information.
This commit is contained in:
Russell Yanofsky
2020-08-04 21:16:48 -04:00
parent 77d5bb72b8
commit 7bf6dfbb48
6 changed files with 29 additions and 39 deletions

View File

@@ -23,6 +23,13 @@ static bool KeyFilter(const std::string& type)
bool RecoverDatabaseFile(const fs::path& file_path, bilingual_str& error, std::vector<bilingual_str>& warnings)
{
DatabaseOptions options;
DatabaseStatus status;
options.require_existing = true;
options.verify = false;
std::unique_ptr<WalletDatabase> database = MakeDatabase(file_path, options, status, error);
if (!database) return false;
std::string filename;
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, filename);