aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-04-16 18:34:34 +1000
committerAnthony Towns <aj@erisian.com.au>2021-06-30 08:19:12 +1000
commitc5f36725e877d8eb492383844f8ef7535466b366 (patch)
treece68ede5ada96fed4a558a1f88e7354e4a1ac3b7 /src/validation.cpp
parent4a69b4dbe0d7f504811b67c399da7e6d11e4f805 (diff)
downloadbitcoin-c5f36725e877d8eb492383844f8ef7535466b366.tar.xz
[refactor] Move ComputeBlockVersion into VersionBitsCache
This also changes ComputeBlockVersion to take the versionbits cache mutex once, rather than once for each versionbits deployment.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index ee10e047bd..65d2dfa3b7 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1627,7 +1627,7 @@ public:
return pindex->nHeight >= params.MinBIP9WarningHeight &&
((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
((pindex->nVersion >> bit) & 1) != 0 &&
- ((ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0;
+ ((g_versionbitscache.ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0;
}
};