@@ -2005,8 +2005,6 @@ class WarningBitsConditionChecker : public AbstractThresholdConditionChecker
2005
2005
}
2006
2006
};
2007
2007
2008
- static std::array<ThresholdConditionCache, VERSIONBITS_NUM_BITS> warningcache GUARDED_BY (cs_main);
2009
-
2010
2008
static unsigned int GetBlockScriptFlags (const CBlockIndex& block_index, const ChainstateManager& chainman)
2011
2009
{
2012
2010
const Consensus::Params& consensusparams = chainman.GetConsensus ();
@@ -2662,7 +2660,7 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
2662
2660
const CBlockIndex* pindex = pindexNew;
2663
2661
for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
2664
2662
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));
2666
2664
if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
2667
2665
const bilingual_str warning = strprintf (_ (" Unknown new rules activated (versionbit %i)" ), bit);
2668
2666
if (state == ThresholdState::ACTIVE) {
@@ -5593,11 +5591,6 @@ ChainstateManager::~ChainstateManager()
5593
5591
LOCK (::cs_main);
5594
5592
5595
5593
m_versionbitscache.Clear ();
5596
-
5597
- // TODO: The warning cache should probably become non-global
5598
- for (auto & i : warningcache) {
5599
- i.clear ();
5600
- }
5601
5594
}
5602
5595
5603
5596
bool ChainstateManager::DetectSnapshotChainstate (CTxMemPool* mempool)
0 commit comments