HomePhabricator

[backport#17342][refactor] Remove global int nScriptCheckThreads

Description

[backport#17342][refactor] Remove global int nScriptCheckThreads

Summary:
The global nScriptCheckThreads int is confusing and is only needed for
its int-ness in AppInitMain. Move all -par parsing logic there and
replace remove the int nScriptCheckThreads with a bool g_parallel_script_checks. (see D521)

Also tidy up logic and improve comments.

https://github.com/bitcoin/bitcoin/pull/17342/commits/5506ecfe7a65d5705616bc048f2f1735b89993fb


Concludes backport of Core PR17342

Depends on D7274

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7275

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Nov 2 2019, 21:14
majcostaCommitted on Sep 1 2020, 12:20
majcostaPushed on Sep 1 2020, 12:20
Reviewer
Restricted Project
Differential Revision
D7275: [backport#17342][refactor] Remove global int nScriptCheckThreads
Parents
rABC02aca79cc39d: [backport#17342][tests] Don't use nScriptCheckThreads in the checkqueue_tests
Branches
Unknown
Tags
Unknown