mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
bugfix: Remove dangling wallet env instance
This commit is contained in:
@@ -694,8 +694,10 @@ void BerkeleyEnvironment::Flush(bool fShutdown)
|
||||
if (mapFileUseCount.empty()) {
|
||||
dbenv->log_archive(&listp, DB_ARCH_REMOVE);
|
||||
Close();
|
||||
if (!fMockDb)
|
||||
if (!fMockDb) {
|
||||
fs::remove_all(fs::path(strPath) / "database");
|
||||
}
|
||||
g_dbenvs.erase(strPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -794,5 +796,6 @@ void BerkeleyDatabase::Flush(bool shutdown)
|
||||
{
|
||||
if (!IsDummy()) {
|
||||
env->Flush(shutdown);
|
||||
if (shutdown) env = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user