aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoin-util.cpp')
-rw-r--r--src/bitcoin-util.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp
index cf59ca9bff..c0ba4df2be 100644
--- a/src/bitcoin-util.cpp
+++ b/src/bitcoin-util.cpp
@@ -127,6 +127,7 @@ static int Grind(const std::vector<std::string>& args, std::string& strPrint)
std::vector<std::thread> threads;
int n_tasks = std::max(1u, std::thread::hardware_concurrency());
+ threads.reserve(n_tasks);
for (int i = 0; i < n_tasks; ++i) {
threads.emplace_back(grind_task, nBits, header, i, n_tasks, std::ref(found), std::ref(proposed_nonce));
}