mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Encapsulate BDB environment inside new CDBEnv class
Cleans up and organizes several scattered functions and variables related to the BDB env. Class CDBInit() existed to provide a guaranteed-via-C++-destructor cleanup of the db environment. A formal CDBEnv class provides all of this inside a single wrapper.
This commit is contained in:
@@ -54,9 +54,9 @@ void Shutdown(void* parg)
|
||||
{
|
||||
fShutdown = true;
|
||||
nTransactionsUpdated++;
|
||||
DBFlush(false);
|
||||
bitdb.Flush(false);
|
||||
StopNode();
|
||||
DBFlush(true);
|
||||
bitdb.Flush(true);
|
||||
boost::filesystem::remove(GetPidFile());
|
||||
UnregisterWallet(pwalletMain);
|
||||
delete pwalletMain;
|
||||
@@ -294,7 +294,7 @@ bool AppInit2()
|
||||
}
|
||||
|
||||
fDebug = GetBoolArg("-debug");
|
||||
fDetachDB = GetBoolArg("-detachdb", false);
|
||||
bitdb.SetDetach(GetBoolArg("-detachdb", false));
|
||||
|
||||
#if !defined(WIN32) && !defined(QT_GUI)
|
||||
fDaemon = GetBoolArg("-daemon");
|
||||
|
||||
Reference in New Issue
Block a user