@@ -1993,8 +1993,6 @@ class WarningBitsConditionChecker : public AbstractThresholdConditionChecker
1993
1993
}
1994
1994
};
1995
1995
1996
- static std::array<ThresholdConditionCache, VERSIONBITS_NUM_BITS> warningcache GUARDED_BY (cs_main);
1997
-
1998
1996
static unsigned int GetBlockScriptFlags (const CBlockIndex& block_index, const ChainstateManager& chainman)
1999
1997
{
2000
1998
const Consensus::Params& consensusparams = chainman.GetConsensus ();
@@ -2640,7 +2638,7 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
2640
2638
const CBlockIndex* pindex = pindexNew;
2641
2639
for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
2642
2640
WarningBitsConditionChecker checker (m_chainman, bit);
2643
- ThresholdState state = checker.GetStateFor (pindex, params.GetConsensus (), warningcache .at (bit));
2641
+ ThresholdState state = checker.GetStateFor (pindex, params.GetConsensus (), m_chainman. m_warningcache .at (bit));
2644
2642
if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
2645
2643
const bilingual_str warning = strprintf (_ (" Unknown new rules activated (versionbit %i)" ), bit);
2646
2644
if (state == ThresholdState::ACTIVE) {
@@ -5586,11 +5584,6 @@ ChainstateManager::~ChainstateManager()
5586
5584
LOCK (::cs_main);
5587
5585
5588
5586
m_versionbitscache.Clear ();
5589
-
5590
- // TODO: The warning cache should probably become non-global
5591
- for (auto & i : warningcache) {
5592
- i.clear ();
5593
- }
5594
5587
}
5595
5588
5596
5589
bool ChainstateManager::DetectSnapshotChainstate (CTxMemPool* mempool)
0 commit comments