File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ bool IsWalletLoaded(const fs::path& wallet_path)
80
80
LOCK (cs_db);
81
81
auto env = g_dbenvs.find (env_directory.string ());
82
82
if (env == g_dbenvs.end ()) return false ;
83
- auto db = env->second .m_databases .find (database_filename);
84
- return db != env->second .m_databases .end ();
83
+ return env->second .IsDatabaseLoaded (database_filename);
85
84
}
86
85
87
86
BerkeleyEnvironment* GetWalletEnv (const fs::path& wallet_path, std::string& database_filename)
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ class BerkeleyEnvironment
56
56
void MakeMock ();
57
57
bool IsMock () const { return fMockDb ; }
58
58
bool IsInitialized () const { return fDbEnvInit ; }
59
+ bool IsDatabaseLoaded (const std::string& db_filename) const { return m_databases.find (db_filename) != m_databases.end (); }
59
60
fs::path Directory () const { return strPath; }
60
61
61
62
/* *
You can’t perform that action at this time.
0 commit comments