mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +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
|
|
@ -15,6 +15,11 @@
|
|||
/* Define a virtual block time, one block per 10 minutes after Nov 14 2014, 0:55:36am */
|
||||
static int32_t TestTime(int nHeight) { return 1415926536 + 600 * nHeight; }
|
||||
|
||||
static int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params)
|
||||
{
|
||||
return g_versionbitscache.ComputeBlockVersion(pindexPrev, params);
|
||||
}
|
||||
|
||||
static const std::string StateName(ThresholdState state)
|
||||
{
|
||||
switch (state) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue