Skip to content

Commit

Permalink
wallet: Remove unused boost::this_thread::interruption_point
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Nov 7, 2019
1 parent 2706162 commit fad1de6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/wallet/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ BerkeleyEnvironment::~BerkeleyEnvironment()

bool BerkeleyEnvironment::Open(bool retry)
{
if (fDbEnvInit)
if (fDbEnvInit) {
return true;

boost::this_thread::interruption_point();
}

fs::path pathIn = strPath;
TryCreateDirectories(pathIn);
Expand Down Expand Up @@ -238,13 +237,11 @@ bool BerkeleyEnvironment::Open(bool retry)
return true;
}

//! Construct an in-memory mock Berkeley environment for testing and as a place-holder for g_dbenvs emplace
//! Construct an in-memory mock Berkeley environment for testing
BerkeleyEnvironment::BerkeleyEnvironment()
{
Reset();

boost::this_thread::interruption_point();

LogPrint(BCLog::DB, "BerkeleyEnvironment::MakeMock\n");

dbenv->set_cachesize(1, 0, 1);
Expand All @@ -263,8 +260,9 @@ BerkeleyEnvironment::BerkeleyEnvironment()
DB_THREAD |
DB_PRIVATE,
S_IRUSR | S_IWUSR);
if (ret > 0)
if (ret > 0) {
throw std::runtime_error(strprintf("BerkeleyEnvironment::MakeMock: Error %d opening database environment.", ret));
}

fDbEnvInit = true;
fMockDb = true;
Expand Down

0 comments on commit fad1de6

Please sign in to comment.