@@ -2005,8 +2005,6 @@ class WarningBitsConditionChecker : public AbstractThresholdConditionChecker
20052005 }
20062006};
20072007
2008- static std::array<ThresholdConditionCache, VERSIONBITS_NUM_BITS> warningcache GUARDED_BY (cs_main);
2009-
20102008static unsigned int GetBlockScriptFlags (const CBlockIndex& block_index, const ChainstateManager& chainman)
20112009{
20122010 const Consensus::Params& consensusparams = chainman.GetConsensus ();
@@ -2662,7 +2660,7 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
26622660 const CBlockIndex* pindex = pindexNew;
26632661 for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
26642662 WarningBitsConditionChecker checker (m_chainman, bit);
2665- ThresholdState state = checker.GetStateFor (pindex, params.GetConsensus (), warningcache .at (bit));
2663+ ThresholdState state = checker.GetStateFor (pindex, params.GetConsensus (), m_chainman. m_warningcache .at (bit));
26662664 if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
26672665 const bilingual_str warning = strprintf (_ (" Unknown new rules activated (versionbit %i)" ), bit);
26682666 if (state == ThresholdState::ACTIVE) {
@@ -5593,11 +5591,6 @@ ChainstateManager::~ChainstateManager()
55935591 LOCK (::cs_main);
55945592
55955593 m_versionbitscache.Clear ();
5596-
5597- // TODO: The warning cache should probably become non-global
5598- for (auto & i : warningcache) {
5599- i.clear ();
5600- }
56015594}
56025595
56035596bool ChainstateManager::DetectSnapshotChainstate (CTxMemPool* mempool)
0 commit comments