diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-08-04 21:16:48 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-09-03 12:24:32 -0400 |
commit | 7bf6dfbb484adfda3b8df26ee3e2ebda239dd263 (patch) | |
tree | 2ed5e50ed96e0196bf5c7bf4925b45bf6aa808fa /src/wallet/salvage.cpp | |
parent | 77d5bb72b8722ec7a6c7c33479a532cbd5870ba4 (diff) |
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.
Diffstat (limited to 'src/wallet/salvage.cpp')
-rw-r--r-- | src/wallet/salvage.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/salvage.cpp b/src/wallet/salvage.cpp index 96fba21339..225b975067 100644 --- a/src/wallet/salvage.cpp +++ b/src/wallet/salvage.cpp @@ -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); |