mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-03 18:06:55 +02:00
refactor: Drop call to GetWalletEnv in wallet salvage code
No observable change in behavior. This just avoids a redundant environment lookup. Motivation is to be able to simplify the GetWalletEnv implementation in an upcoming commit.
This commit is contained in:
@@ -32,8 +32,9 @@ bool RecoverDatabaseFile(const fs::path& file_path, bilingual_str& error, std::v
|
|||||||
std::unique_ptr<WalletDatabase> database = MakeDatabase(file_path, options, status, error);
|
std::unique_ptr<WalletDatabase> database = MakeDatabase(file_path, options, status, error);
|
||||||
if (!database) return false;
|
if (!database) return false;
|
||||||
|
|
||||||
std::string filename;
|
BerkeleyDatabase& berkeley_database = static_cast<BerkeleyDatabase&>(*database);
|
||||||
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, filename);
|
std::string filename = berkeley_database.Filename();
|
||||||
|
std::shared_ptr<BerkeleyEnvironment> env = berkeley_database.env;
|
||||||
|
|
||||||
if (!env->Open(error)) {
|
if (!env->Open(error)) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user