diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-11-04 12:48:45 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-11-04 12:59:06 +0100 |
commit | 92467073adc11a76a26bbb55ccaed454169636f3 (patch) | |
tree | d0fb53976eb43cff56bb8318cdbbbe154d73b540 /src/db.cpp | |
parent | a56d3f8a10e3c9f844aee1f362635ae14b872023 (diff) |
Remove -detachdb and stop's detach argument.
As the only BDB database left is the wallet, and it is always
detached.
Also remove IsChainFile() predicate and related chainfile-specific
logic.
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/db.cpp b/src/db.cpp index cf96fe6e38..fb405fc277 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -271,14 +271,6 @@ CDB::CDB(const char *pszFile, const char* pszMode) : } } -static bool IsChainFile(std::string strFile) -{ - if (strFile == "coins.dat" || strFile == "blktree.dat") - return true; - - return false; -} - void CDB::Flush() { if (activeTxn) @@ -288,10 +280,6 @@ void CDB::Flush() unsigned int nMinutes = 0; if (fReadOnly) nMinutes = 1; - if (IsChainFile(strFile)) - nMinutes = 2; - if (IsChainFile(strFile) && IsInitialBlockDownload()) - nMinutes = 5; bitdb.dbenv.txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100)*1024 : 0, nMinutes, 0); } @@ -453,11 +441,9 @@ void CDBEnv::Flush(bool fShutdown) CloseDb(strFile); printf("%s checkpoint\n", strFile.c_str()); dbenv.txn_checkpoint(0, 0, 0); - if (!IsChainFile(strFile) || fDetachDB) { - printf("%s detach\n", strFile.c_str()); - if (!fMockDb) - dbenv.lsn_reset(strFile.c_str(), 0); - } + printf("%s detach\n", strFile.c_str()); + if (!fMockDb) + dbenv.lsn_reset(strFile.c_str(), 0); printf("%s closed\n", strFile.c_str()); mapFileUseCount.erase(mi++); } |