We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f66e1c7 commit a769461Copy full SHA for a769461
src/wallet/db.cpp
@@ -697,7 +697,6 @@ void BerkeleyEnvironment::Flush(bool fShutdown)
697
if (!fMockDb) {
698
fs::remove_all(fs::path(strPath) / "database");
699
}
700
- g_dbenvs.erase(strPath);
701
702
703
@@ -796,6 +795,10 @@ void BerkeleyDatabase::Flush(bool shutdown)
796
795
{
797
if (!IsDummy()) {
798
env->Flush(shutdown);
799
- if (shutdown) env = nullptr;
+ if (shutdown) {
+ LOCK(cs_db);
800
+ g_dbenvs.erase(env->Directory().string());
801
+ env = nullptr;
802
+ }
803
804
0 commit comments