From faa958bc283023334b9377f5fb2210459ca16d82 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 24 Apr 2020 11:08:09 -0400 Subject: [PATCH 1/3] txindex: Remove unused boost/thread --- src/index/txindex.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 4626395ef05..59d1888fffe 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -9,8 +9,6 @@ #include #include -#include - constexpr char DB_BEST_BLOCK = 'B'; constexpr char DB_TXINDEX = 't'; constexpr char DB_TXINDEX_BLOCK = 'T'; @@ -150,7 +148,6 @@ bool TxIndex::DB::MigrateData(CBlockTreeDB& block_tree_db, const CBlockLocator& bool interrupted = false; std::unique_ptr cursor(block_tree_db.NewIterator()); for (cursor->Seek(begin_key); cursor->Valid(); cursor->Next()) { - boost::this_thread::interruption_point(); if (ShutdownRequested()) { interrupted = true; break; From fad8c890f5ae6e083e416781b4857a1a53ad5249 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 24 Apr 2020 11:36:29 -0400 Subject: [PATCH 2/3] txdb: Remove unused boost/thread --- src/txdb.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/txdb.cpp b/src/txdb.cpp index 129697f0e70..6f652c1375c 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -16,8 +16,6 @@ #include -#include - static const char DB_COIN = 'C'; static const char DB_COINS = 'c'; static const char DB_BLOCK_FILES = 'f'; @@ -242,7 +240,6 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, // Load m_block_index while (pcursor->Valid()) { - boost::this_thread::interruption_point(); if (ShutdownRequested()) return false; std::pair key; if (pcursor->GetKey(key) && key.first == DB_BLOCK_INDEX) { @@ -354,7 +351,6 @@ bool CCoinsViewDB::Upgrade() { std::pair key; std::pair prev_key = {DB_COINS, uint256()}; while (pcursor->Valid()) { - boost::this_thread::interruption_point(); if (ShutdownRequested()) { break; } From 89f9fef1f71dfeff4baa59bc42bc9049a46d911b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 24 Apr 2020 08:39:32 -0400 Subject: [PATCH 3/3] refactor: Specify boost/thread/thread.hpp explicitly --- src/init.cpp | 4 +--- src/script/sigcache.cpp | 2 +- src/test/checkqueue_tests.cpp | 2 +- src/test/scheduler_tests.cpp | 2 +- src/test/util/setup_common.h | 2 +- test/lint/lint-includes.sh | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 37e62512955..c8329d551d4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -71,11 +71,9 @@ #include #endif -#include #include -#include #include -#include +#include #if ENABLE_ZMQ #include diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index 3c54d5bee4d..aaecab1ef2e 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace { /** diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp index 35750b2ebc5..8348810ac1e 100644 --- a/src/test/checkqueue_tests.cpp +++ b/src/test/checkqueue_tests.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index 1395a7f38cc..fcee6a9b9d5 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index 2477f9ad06a..d5cda8a95b3 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -17,7 +17,7 @@ #include -#include +#include /** This is connected to the logger. Can be used to redirect logs to any other log */ extern const std::function G_TEST_LOG_FUN; diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh index bd9c8337ac6..5404565b94b 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -67,9 +67,9 @@ EXPECTED_BOOST_INCLUDES=( boost/signals2/last_value.hpp boost/signals2/signal.hpp boost/test/unit_test.hpp - boost/thread.hpp boost/thread/condition_variable.hpp boost/thread/mutex.hpp + boost/thread/shared_mutex.hpp boost/thread/thread.hpp boost/variant.hpp boost/variant/apply_visitor.hpp