walletdb: Move PeriodicFlush into WalletDatabase

Make PeriodicFlush a non-static member of WalletDatabase instead of
WalletBatch.
This commit is contained in:
Andrew Chow
2020-06-15 14:39:26 -04:00
parent 8f1bcf8b7b
commit 91d109156d
3 changed files with 6 additions and 9 deletions

View File

@@ -614,14 +614,12 @@ void BerkeleyEnvironment::Flush(bool fShutdown)
}
}
bool BerkeleyBatch::PeriodicFlush(BerkeleyDatabase& database)
bool BerkeleyDatabase::PeriodicFlush()
{
if (database.IsDummy()) {
if (IsDummy()) {
return true;
}
bool ret = false;
BerkeleyEnvironment *env = database.env.get();
const std::string& strFile = database.strFile;
TRY_LOCK(cs_db, lockDb);
if (lockDb)
{