SideChain: stricter checks for number of threads

pull/189/head
SChernykh 2 years ago
parent 7d5ff13f75
commit 0e7c1aa481

@ -167,8 +167,9 @@ SideChain::SideChain(p2pool* pool, NetworkType type, const char* pool_name)
--numThreads;
}
// Use no more than 8 threads
numThreads = std::min<uint32_t>(numThreads, 8);
// Use between 1 and 8 threads
if (numThreads < 1) numThreads = 1;
if (numThreads > 8) numThreads = 8;
LOGINFO(4, "running " << numThreads << " pre-calculation workers");

Loading…
Cancel
Save