consensus: Remove special treatment for single threaded script checking

bitcoin/bitcoin: PR #32575

2 suggestions

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Cache-publication test omits the zero-worker configuration

Ordinary unit-test runs use two workers, so the new test does not cover the zero-worker partial-caching behavior changed by this PR.

Location: src/test/txvalidationcache_tests.cpp:373 (head).

Details and suggested fix

TestChain100Setup sets worker_threads_num directly rather than reading -par. On base, zero-worker TestBlockValidity cached the valid parent inline before rejecting bad_child. The worker path never inserted full-script cache entries, so the failed-block cache assertions would also hold there. Head correctly publishes only after queue completion succeeds, but restoring zero-worker inline caching would escape these assertions. Add a worker-count option to the fixture and run the same invalid-then-valid block sequence with fresh 0- and 2-worker setups, retaining the reject-reason and cache-hit assertions. Passing -par=1 alone will not change this fixture's worker count.


Link

[suggestion] · CheckInputScripts retains an unused signature-cache mode

Every remaining in-tree CheckInputScripts caller enables signature-cache storage, so retaining cacheSigStore exposes an unused mode and obscures the full-script-cache choice at true, false call sites.

Location: src/validation.cpp:2110 (head).

Details and suggested fix

ConnectBlock was the only in-tree caller that could disable signature-cache storage, and now passes its fJustCheck-dependent choice directly to CScriptCheck. Both remaining production calls and all five test calls pass cacheSigStore=true; the wrapper only forwards that value to the constructor. Remove this parameter from the declaration, definition, callers and documentation, and pass /*cacheIn=*/true internally. This leaves cacheFullScriptStore as the wrapper's only cache-mode argument while preserving both modes on CScriptCheck for block connection.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.