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)
8080 LOCK (cs_db);
8181 auto env = g_dbenvs.find (env_directory.string ());
8282 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);
8584}
8685
8786BerkeleyEnvironment* 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
5656 void MakeMock ();
5757 bool IsMock () const { return fMockDb ; }
5858 bool IsInitialized () const { return fDbEnvInit ; }
59+ bool IsDatabaseLoaded (const std::string& db_filename) const { return m_databases.find (db_filename) != m_databases.end (); }
5960 fs::path Directory () const { return strPath; }
6061
6162 /* *
You can’t perform that action at this time.
0 commit comments