aboutsummaryrefslogtreecommitdiff
path: root/src/miner.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/miner.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/miner.cpp')
-rw-r--r--src/miner.cpp2
1 files changed, 1 insertions, 1 deletions
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<CBlockTemplate> 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())