aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-11-08 08:45:35 -0500
committerfanquake <fanquake@gmail.com>2019-11-08 09:01:09 -0500
commit8021392b825c74312173f15eb937ba6d4aec3841 (patch)
treeaea98038459e6eb0b2c9c44522fce12a4fd63e88
parent4a3b6f47cd75bd7ed90fc43d78e1f42ad9b0d097 (diff)
parentfad1de66a29bf6bd348a932150dad7d472feb3d0 (diff)
Merge #17405: wallet: Remove unused boost::this_thread::interruption_point
fad1de66a29bf6bd348a932150dad7d472feb3d0 wallet: Remove unused boost::this_thread::interruption_point (MarcoFalke) Pull request description: `BerkeleyEnvironment::Open` is only called from the main thread (init) or an http rpc thread, neither of which can be interrupted, so remove the useless interruption point. `BerkeleyEnvironment{}` is only used in tests, which run in a single process/thread, so remove the useless interruption point. ACKs for top commit: laanwj: ACK fad1de66a29bf6bd348a932150dad7d472feb3d0 fanquake: ACK fad1de66a29bf6bd348a932150dad7d472feb3d0 Tree-SHA512: dacd8398e966e4a6ce5cf7d3ed821c9c267eff40b14c0635085441647cdb72d1642807f89355419f1710f814c7963e35a10d102d0b985c7198261dfc736256f8
-rw-r--r--src/wallet/db.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index e48eee6c2c..76f14cb33f 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -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);
@@ -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);
@@ -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;