- before this was logged as "Using 0 threads for script verification" and now reads "Using direct script verification (threads disabled)"
2nd commit (because init related):
- minor logging change in init when !ENABLE_WALLET
2nd commit (because init related):
- before this was logged as "Using 0 threads for script verification" and
now reads "Using direct script verification (threads disabled)"
787 | @@ -788,7 +788,9 @@ bool AppInit2(boost::thread_group& threadGroup) 788 | LogPrintf("Using at most %i connections (%i file descriptors available)\n", nMaxConnections, nFD); 789 | std::ostringstream strErrors; 790 | 791 | - LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads); 792 | + // nScriptCheckThreads == 0 means we want to display it as 1 thread 793 | + unsigned int logScriptCheckThreads = (nScriptCheckThreads == 0) ? 1 : nScriptCheckThreads; 794 | + LogPrintf("Using %u threads for script verification\n", logScriptCheckThreads);
The logic here is too complicated for it's own sake, but I think you're wrong here. 0 threads means 0 threads. No "script verification threads" are created.
Damn right, my initial thoughts were that they HAVE to be checked anyway, so 0 threads makes no sense. But without threads just means we do it directly in the function and not in separate threads right?
Yes, "0 threads" means that verification is done in the caller thread. But I don't think it's worth changing this code for, sorry. We're already overworked, let's try to keep down on the number of unnecessary changes.