aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2020-12-29 22:43:18 +1000
committerAnthony Towns <aj@erisian.com.au>2021-06-29 17:11:12 +1000
commiteccd736f3dc231ac0306ca763c3b72cf8247230a (patch)
tree3d9a5aaeaec55e5942a66f2523e0564d52b6f2d5 /src/validation.cpp
parent36a4ba0aaaa9b35185d7178994e36bc02cca9887 (diff)
downloadbitcoin-eccd736f3dc231ac0306ca763c3b72cf8247230a.tar.xz
versionbits: Use dedicated lock instead of cs_main
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index df0ec3bd4f..1b0f881d14 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1606,11 +1606,10 @@ void StopScriptCheckWorkerThreads()
scriptcheckqueue.StopWorkerThreads();
}
-VersionBitsCache versionbitscache GUARDED_BY(cs_main);
+VersionBitsCache versionbitscache;
int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params)
{
- LOCK(cs_main);
int32_t nVersion = VERSIONBITS_TOP_BITS;
for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) {
@@ -1659,9 +1658,8 @@ static bool IsScriptWitnessEnabled(const Consensus::Params& params)
return params.SegwitHeight != std::numeric_limits<int>::max();
}
-static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& consensusparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
- AssertLockHeld(cs_main);
-
+static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& consensusparams)
+{
unsigned int flags = SCRIPT_VERIFY_NONE;
// BIP16 didn't become active until Apr 1 2012 (on mainnet, and