aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-12-07 15:38:09 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-12-07 15:40:50 +0100
commitb8b0b8ced7fa918ae00b697e5696b1950dfb714c (patch)
tree22357c7b1f310edaf2fc58d81e50821411098c18
parentf544e235563f77d5da959fa80249970752cc9811 (diff)
parentb7df96f4565064bcb7cbbf7e2507e03bdcf339f0 (diff)
downloadbitcoin-b8b0b8ced7fa918ae00b697e5696b1950dfb714c.tar.xz
Merge #14480: refactor: Drop boost::this_thread::interruption_point and boost::thread_interrupted in main thread
b7df96f4565064bcb7cbbf7e2507e03bdcf339f0 refactor: Drop boost::this_thread::interruption_point and boost::thread_interrupted in main thread (Chun Kuan Lee) Pull request description: This PR drops useless `boost::this_thread::interruption_point` and `boost::thread_interrupted` catch. They are only executed in main thread. Tree-SHA512: a980d098c1a8238e4f0da9493731d7e69b9ca8e010103f442722d0d4cce471cc40a1fafd5f05535ad0e18899b6cf7563ee20e4025f7c7bc15182a0058c028922
-rw-r--r--src/bitcoin-cli.cpp3
-rw-r--r--src/bitcoin-tx.cpp4
-rw-r--r--src/validation.cpp2
3 files changed, 0 insertions, 9 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 262458a684..7cdf61ad35 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -492,9 +492,6 @@ static int CommandLineRPC(int argc, char *argv[])
}
} while (fWait);
}
- catch (const boost::thread_interrupted&) {
- throw;
- }
catch (const std::exception& e) {
strPrint = std::string("error: ") + e.what();
nRet = EXIT_FAILURE;
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index bc91ca3641..2e41adc276 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -820,10 +820,6 @@ static int CommandLineRawTx(int argc, char* argv[])
OutputTx(tx);
}
-
- catch (const boost::thread_interrupted&) {
- throw;
- }
catch (const std::exception& e) {
strPrint = std::string("error: ") + e.what();
nRet = EXIT_FAILURE;
diff --git a/src/validation.cpp b/src/validation.cpp
index 0543804e34..e92cbf1b8d 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3819,8 +3819,6 @@ bool CChainState::LoadBlockIndex(const Consensus::Params& consensus_params, CBlo
if (!blocktree.LoadBlockIndexGuts(consensus_params, [this](const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { return this->InsertBlockIndex(hash); }))
return false;
- boost::this_thread::interruption_point();
-
// Calculate nChainWork
std::vector<std::pair<int, CBlockIndex*> > vSortedByHeight;
vSortedByHeight.reserve(mapBlockIndex.size());