mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
[refactor] Move ComputeBlockVersion into VersionBitsCache
This also changes ComputeBlockVersion to take the versionbits cache mutex once, rather than once for each versionbits deployment.
This commit is contained in:
parent
4a69b4dbe0
commit
c5f36725e8
5 changed files with 16 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue