From c5f36725e877d8eb492383844f8ef7535466b366 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Fri, 16 Apr 2021 18:34:34 +1000 Subject: [refactor] Move ComputeBlockVersion into VersionBitsCache This also changes ComputeBlockVersion to take the versionbits cache mutex once, rather than once for each versionbits deployment. --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/miner.cpp') diff --git a/src/miner.cpp b/src/miner.cpp index c1a992b9e9..d9186a5d6d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -121,7 +121,7 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc assert(pindexPrev != nullptr); nHeight = pindexPrev->nHeight + 1; - pblock->nVersion = ComputeBlockVersion(pindexPrev, chainparams.GetConsensus()); + pblock->nVersion = g_versionbitscache.ComputeBlockVersion(pindexPrev, chainparams.GetConsensus()); // -regtest only: allow overriding block.nVersion with // -blockversion=N to test forking scenarios if (chainparams.MineBlocksOnDemand()) -- cgit v1.2.3