diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-07-07 10:33:11 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-10-03 10:52:06 +0100 |
commit | be4ff3060b7b43b496dfb5a2c02b114b2b717106 (patch) | |
tree | bec551631a7c6f0047f3a65cac8a3995794b3108 /src/validation.h | |
parent | 4e78834ec11ede578437e7a96bafd5542f26a9d5 (diff) |
Move global `scriptcheckqueue` into `ChainstateManager` class
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/validation.h b/src/validation.h index 94a00e44a4..5fc4efae14 100644 --- a/src/validation.h +++ b/src/validation.h @@ -13,6 +13,7 @@ #include <arith_uint256.h> #include <attributes.h> #include <chain.h> +#include <checkqueue.h> #include <kernel/chain.h> #include <consensus/amount.h> #include <deploymentstatus.h> @@ -98,11 +99,6 @@ extern uint256 g_best_block; /** Documentation for argument 'checklevel'. */ extern const std::vector<std::string> CHECKLEVEL_DOC; -/** Run instances of script checking worker threads */ -void StartScriptCheckWorkerThreads(int threads_num); -/** Stop all of the script checking worker threads */ -void StopScriptCheckWorkerThreads(); - CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams); bool FatalError(kernel::Notifications& notifications, BlockValidationState& state, const std::string& strMessage, const bilingual_str& userMessage = {}); @@ -896,6 +892,9 @@ private: return cs && !cs->m_disabled; } + //! A queue for script verifications that have to be performed by worker threads. + CCheckQueue<CScriptCheck> m_script_check_queue; + public: using Options = kernel::ChainstateManagerOpts; @@ -1246,6 +1245,9 @@ public: //! nullopt. std::optional<int> GetSnapshotBaseHeight() const EXCLUSIVE_LOCKS_REQUIRED(::cs_main); + CCheckQueue<CScriptCheck>& GetCheckQueue() { return m_script_check_queue; } + void StopScriptCheckWorkerThreads(); + ~ChainstateManager(); }; |