diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-31 19:02:47 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-04 13:23:02 +0000 |
commit | 1426209a10602e07e80cf93117b1c80ca58ace9b (patch) | |
tree | 40fd90d94776f8a0f84a705d7c89807f5f80acdb /src/cryptonote_core/blockchain.cpp | |
parent | db_lmdb: slight speedup getting array data from the blockchain (diff) | |
download | monero-1426209a10602e07e80cf93117b1c80ca58ace9b.tar.xz |
blockchain: don't run threads if we have just one function to run
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 7576e0ed7..8b94a30f0 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -4171,7 +4171,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete if (!m_db->can_thread_bulk_indices()) threads = 1; - if (threads > 1) + if (threads > 1 && amounts.size() > 1) { tools::threadpool::waiter waiter; |