clarify log message for script verification threads #5673

pull Diapolo wants to merge 2 commits into bitcoin:master from Diapolo:fix_scriptthread_logging changing 1 files +5 −3
  1. Diapolo commented at 7:55 AM on January 16, 2015: none
    • 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
  2. clarify log message for script verification threads
    - before this was logged as "Using 0 threads for script verification" and
      now reads "Using direct script verification (threads disabled)"
    124fc17d83
  3. minor logging change in init when !ENABLE_WALLET 37dbcae27f
  4. in src/init.cpp:None in 620bdfb851 outdated
     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);
    


    laanwj commented at 8:50 AM on January 16, 2015:

    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.


    Diapolo commented at 9:15 AM on January 16, 2015:

    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?


    Diapolo commented at 9:27 AM on January 16, 2015:

    @laanwj I know it's minor, but reworked it to be more clear. You are free to accept this pull or just want to close it.


    laanwj commented at 9:32 AM on January 16, 2015:

    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.

  5. Diapolo renamed this:
    fix logging of script threads number when using 1 thread
    clarify log message for script verification threads
    on Jan 16, 2015
  6. laanwj closed this on Jan 16, 2015

  7. Diapolo deleted the branch on Jan 16, 2015
  8. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me