aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-31 19:02:47 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-04 13:23:02 +0000
commit1426209a10602e07e80cf93117b1c80ca58ace9b (patch)
tree40fd90d94776f8a0f84a705d7c89807f5f80acdb /src
parentdb_lmdb: slight speedup getting array data from the blockchain (diff)
downloadmonero-1426209a10602e07e80cf93117b1c80ca58ace9b.tar.xz
blockchain: don't run threads if we have just one function to run
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
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;