aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/bdb.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-05-28 17:30:50 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-07-29 12:30:23 -0400
commitda039d2a915097c23f2b46e063042409bdc3c4f4 (patch)
treebb5d0c259810e2093c6e787ab65b5b01e893b55e /src/wallet/bdb.cpp
parent0103d6434ea9d155259b40575008239a3762d6f7 (diff)
Remove BDB dummy databases
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r--src/wallet/bdb.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp
index a8719806ab..3178a7b47a 100644
--- a/src/wallet/bdb.cpp
+++ b/src/wallet/bdb.cpp
@@ -337,10 +337,6 @@ BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bo
void BerkeleyDatabase::Open(const char* pszMode)
{
- if (IsDummy()){
- return;
- }
-
bool fCreate = strchr(pszMode, 'c') != nullptr;
unsigned int nFlags = DB_THREAD;
if (fCreate)
@@ -472,9 +468,6 @@ void BerkeleyEnvironment::ReloadDbEnv()
bool BerkeleyDatabase::Rewrite(const char* pszSkip)
{
- if (IsDummy()) {
- return true;
- }
while (true) {
{
LOCK(cs_db);
@@ -602,9 +595,6 @@ void BerkeleyEnvironment::Flush(bool fShutdown)
bool BerkeleyDatabase::PeriodicFlush()
{
- // There's nothing to do for dummy databases. Return true.
- if (IsDummy()) return true;
-
// Don't flush if we can't acquire the lock.
TRY_LOCK(cs_db, lockDb);
if (!lockDb) return false;
@@ -632,9 +622,6 @@ bool BerkeleyDatabase::PeriodicFlush()
bool BerkeleyDatabase::Backup(const std::string& strDest) const
{
- if (IsDummy()) {
- return false;
- }
while (true)
{
{
@@ -672,23 +659,17 @@ bool BerkeleyDatabase::Backup(const std::string& strDest) const
void BerkeleyDatabase::Flush()
{
- if (!IsDummy()) {
- env->Flush(false);
- }
+ env->Flush(false);
}
void BerkeleyDatabase::Close()
{
- if (!IsDummy()) {
- env->Flush(true);
- }
+ env->Flush(true);
}
void BerkeleyDatabase::ReloadDbEnv()
{
- if (!IsDummy()) {
- env->ReloadDbEnv();
- }
+ env->ReloadDbEnv();
}
bool BerkeleyBatch::StartCursor()