diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-13 21:37:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-05-19 20:43:19 -0400 |
commit | cd9696fc97fc06831c1edede62a063028f2afe75 (patch) | |
tree | 8a1ce2483296e0370a2986bb781c4f55d4f01e64 /src/init.cpp | |
parent | b52a27053850590e0ac8f1431a9aad50b7beffee (diff) | |
download | bitcoin-cd9696fc97fc06831c1edede62a063028f2afe75.tar.xz |
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 829600a4fd..809c07f375 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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"); |