HomePhabricator

fix ASAN error relating to nSigChecksBlockLimiter

Description

fix ASAN error relating to nSigChecksBlockLimiter

Summary:
See sanitizer log here, we have a use after scope:
https://build.bitcoinabc.org/viewLog.html?buildId=29430&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterAsan&tab=artifacts

The order of destructor cleanup is reverse of declaration order.
Thus we need nSigChecksBlockLimiter to be declared before control which is the RAII on all script check worker threads having finished their work.

(D5179)

Test Plan: ninja check-all ; run ASAN tests

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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