diff options
author | Anthony Towns <aj@erisian.com.au> | 2021-04-16 18:34:34 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2021-06-30 08:19:12 +1000 |
commit | c5f36725e877d8eb492383844f8ef7535466b366 (patch) | |
tree | ce68ede5ada96fed4a558a1f88e7354e4a1ac3b7 /src/validation.cpp | |
parent | 4a69b4dbe0d7f504811b67c399da7e6d11e4f805 (diff) |
[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.cpp | 2 |
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; } }; |