diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-04-15 06:53:19 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-05-10 12:09:33 +1000 |
commit | bb5c24b120a3ac7df367a1c5d9b075ca564efb5f (patch) | |
tree | fb615ac890a78c4536a985db148c0d70d4ad2ef7 /src/rpc/mining.cpp | |
parent | eca22c726ac48b4216bb68cc0f0bbd655c43ac12 (diff) |
validation: move g_versionbitscache into ChainstateManager
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r-- | src/rpc/mining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 05776e7899..568474fcb9 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -836,7 +836,7 @@ static RPCHelpMan getblocktemplate() UniValue vbavailable(UniValue::VOBJ); for (int j = 0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) { Consensus::DeploymentPos pos = Consensus::DeploymentPos(j); - ThresholdState state = g_versionbitscache.State(pindexPrev, consensusParams, pos); + ThresholdState state = chainman.m_versionbitscache.State(pindexPrev, consensusParams, pos); switch (state) { case ThresholdState::DEFINED: case ThresholdState::FAILED: @@ -844,7 +844,7 @@ static RPCHelpMan getblocktemplate() break; case ThresholdState::LOCKED_IN: // Ensure bit is set in block version - pblock->nVersion |= g_versionbitscache.Mask(consensusParams, pos); + pblock->nVersion |= chainman.m_versionbitscache.Mask(consensusParams, pos); [[fallthrough]]; case ThresholdState::STARTED: { @@ -853,7 +853,7 @@ static RPCHelpMan getblocktemplate() if (setClientRules.find(vbinfo.name) == setClientRules.end()) { if (!vbinfo.gbt_force) { // If the client doesn't support this, don't indicate it in the [default] version - pblock->nVersion &= ~g_versionbitscache.Mask(consensusParams, pos); + pblock->nVersion &= ~chainman.m_versionbitscache.Mask(consensusParams, pos); } } break; |