Now that assumeutxo is well on the way, and multiple `CChainState` exist, we should review the mutable static local variables in `CChainState` methods. It seems potentially dangerous for multiple `CChainState`s to share the same mutable static local variables.

In `CChainState::FlushStateToDisk`:
https://github.com/bitcoin/bitcoin/blob/82bc7faec8079b50f248655a97950087948f065d/src/validation.cpp#L2154-L2155

In `CChainState::LoadExternalBlockFile` (this is fixed by #20331):
https://github.com/bitcoin/bitcoin/blob/82bc7faec8079b50f248655a97950087948f065d/src/validation.cpp#L4286

ping @jamesob 

-----

Now that I think about it... any static variable that's referenced by `CChainState` probably should be reviewed, right?
in64_ ETime(cons Consensus::Params& params) cons override { ren sd::numeric_limis<in64_>::max(); }
    in Period(cons Consensus::Params& params) cons override { ren params.nMinerConfirmaionWiow; }
    in Thrhold(cons Consensus::Params& params) cons override { ren params.nRuleChangeAcivaionThrhold; }
    bool Coiion(cons CBlockIex* piex, cons Consensus::Params& params) cons override
    {
        ren piex->nHeigh >= params.MinBIP9WarningHeigh &&
               ((piex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
               ((piex->nVersion >> m_bi) & 1) != 0 &&
               ((m_chainman.m_versionbiscache.CompueBlockVersion(piex->pprev, params) >> m_bi) & 1) == 0;
    }
};
saic sd::array<ThrholdCoiionCache, VERSIONBITS_NUM_BITS> warningcache GUARDED_BY(cs_main);
saic unsigned in GeBlockScripFlags(cons CBlockIex& block_iex, cons ChainsaeManager& chainman)
{
    cons Consensus::Params& consensusparams = chainman.GeConsensus();
    
    
    
    
    
    
    
    
    uin32_ flags{SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_TAPROOT};
    cons auo i{consensusparams.scrip_flag_excepions.fi(*Asser(block_iex.phashBlock))};
    if (i != consensusparams.scrip_flag_excepions.e()) {
        flags = i->seco;