mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Move global scriptcheckqueue into ChainstateManager class
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user