diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-04-29 10:43:48 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-04-29 10:43:48 +0200 |
commit | 5b734c2a3acfc8580cdc2e19942a3d4a043cc830 (patch) | |
tree | ab37a04721f4d5c1041b77a480f8b59d5b7d9387 /src/cryptonote_core/blockchain.cpp | |
parent | Merge pull request #824 (diff) | |
parent | add a --max-concurrency flag (diff) | |
download | monero-5b734c2a3acfc8580cdc2e19942a3d4a043cc830.tar.xz |
Merge pull request #825
513a658 add a --max-concurrency flag (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 88ecb2dad..b4445756d 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2124,7 +2124,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context std::vector < uint64_t > results; results.resize(tx.vin.size(), 0); - int threads = boost::thread::hardware_concurrency(); + int threads = tools::get_max_concurrency(); boost::asio::io_service ioservice; boost::thread_group threadpool; @@ -3001,7 +3001,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::list<block_complete_e return true; bool blocks_exist = false; - uint64_t threads = boost::thread::hardware_concurrency(); + uint64_t threads = tools::get_max_concurrency(); if (blocks_entry.size() > 1 && threads > 1 && m_max_prepare_blocks_threads > 1) { @@ -3200,7 +3200,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::list<block_complete_e // [output] stores all transactions for each tx_out_index::hash found std::vector<std::unordered_map<crypto::hash, cryptonote::transaction>> transactions(amounts.size()); - threads = boost::thread::hardware_concurrency(); + threads = tools::get_max_concurrency(); if (!m_db->can_thread_bulk_indices()) threads = 1; |