Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/db.cpp
Show First 20 Lines • Show All 778 Lines • ▼ Show 20 Lines | while (true) { | ||||
} | } | ||||
MilliSleep(100); | MilliSleep(100); | ||||
} | } | ||||
} | } | ||||
void BerkeleyEnvironment::Flush(bool fShutdown) { | void BerkeleyEnvironment::Flush(bool fShutdown) { | ||||
int64_t nStart = GetTimeMillis(); | int64_t nStart = GetTimeMillis(); | ||||
// Flush log data to the actual data file on all files that are not in use | // Flush log data to the actual data file on all files that are not in use | ||||
LogPrint(BCLog::DB, "BerkeleyEnvironment::Flush: Flush(%s)%s\n", | LogPrint(BCLog::DB, "BerkeleyEnvironment::Flush: [%s] Flush(%s)%s\n", | ||||
fShutdown ? "true" : "false", | strPath, fShutdown ? "true" : "false", | ||||
fDbEnvInit ? "" : " database not started"); | fDbEnvInit ? "" : " database not started"); | ||||
if (!fDbEnvInit) { | if (!fDbEnvInit) { | ||||
return; | return; | ||||
} | } | ||||
{ | { | ||||
LOCK(cs_db); | LOCK(cs_db); | ||||
std::map<std::string, int>::iterator mi = mapFileUseCount.begin(); | std::map<std::string, int>::iterator mi = mapFileUseCount.begin(); | ||||
while (mi != mapFileUseCount.end()) { | while (mi != mapFileUseCount.end()) { | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |