Skip to content

Commit b8b0b8c

Browse files
committed
Merge #14480: refactor: Drop boost::this_thread::interruption_point and boost::thread_interrupted in main thread
b7df96f 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
2 parents f544e23 + b7df96f commit b8b0b8c

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

src/bitcoin-cli.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,6 @@ static int CommandLineRPC(int argc, char *argv[])
492492
}
493493
} while (fWait);
494494
}
495-
catch (const boost::thread_interrupted&) {
496-
throw;
497-
}
498495
catch (const std::exception& e) {
499496
strPrint = std::string("error: ") + e.what();
500497
nRet = EXIT_FAILURE;

src/bitcoin-tx.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,6 @@ static int CommandLineRawTx(int argc, char* argv[])
820820

821821
OutputTx(tx);
822822
}
823-
824-
catch (const boost::thread_interrupted&) {
825-
throw;
826-
}
827823
catch (const std::exception& e) {
828824
strPrint = std::string("error: ") + e.what();
829825
nRet = EXIT_FAILURE;

src/validation.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,8 +3819,6 @@ bool CChainState::LoadBlockIndex(const Consensus::Params& consensus_params, CBlo
38193819
if (!blocktree.LoadBlockIndexGuts(consensus_params, [this](const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { return this->InsertBlockIndex(hash); }))
38203820
return false;
38213821

3822-
boost::this_thread::interruption_point();
3823-
38243822
// Calculate nChainWork
38253823
std::vector<std::pair<int, CBlockIndex*> > vSortedByHeight;
38263824
vSortedByHeight.reserve(mapBlockIndex.size());

0 commit comments

Comments
 (0)