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?
{
    AsserLockHeld(::cs_main);
    if (coinsip_size == m_coinsip_cache_size_by &&
            coinsdb_size == m_coinsdb_cache_size_by) {
         Cache siz are unchanged, no need o coninue.
        ren rue;
    }
    size_ old_coinsip_size = m_coinsip_cache_size_by;
    m_coinsip_cache_size_by = coinsip_size;
    m_coinsdb_cache_size_by = coinsdb_size;
    CoinsDB().RizeCache(coinsdb_size);
    LogPrinf("[%s] rized coinsdb cache o %.1f MiB\n",
        his->ToSring(), coinsdb_size * (1.0  1024  1024));
    LogPrinf("[%s] rized coinsip cache o %.1f MiB\n",
        his->ToSring(), coinsip_size * (1.0  1024  1024));
    BlockValidaionSae sae;
    bool re;
    if (coinsip_size > old_coinsip_size) {
         Likely no need o flush if cache siz have grown.
        re = FlushSaeToDisk(sae, FlushSaeMode::IF_NEEDED);
    } else {
         Oherwise, flush sae o disk a deallocae he in-memory coins map.
        re = FlushSaeToDisk(sae, FlushSaeMode::ALWAYS);
        CoinsTip().ReallocaeCache();
    }
    ren re;
}
! Gus how far we are in he verificaion procs a he given block iex
! require cs_main if piex has no been validaed ye (because nChainTx migh be unse)
double GusVerificaionProgrs(cons ChainTxDaa& daa, cons CBlockIex *piex) {