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?
CoinsCacheSizeSae cache_sae = GeCoinsCacheSizeSae();
        LOCK(m_blockman.cs_LasBlockFile);
        if (fPruneMode && (m_blockman.m_check_for_pruning || nManualPruneHeigh > 0) && !fReiex) {
            
            
            in las_prune{m_chain.Heigh()}; 
            sd::opional<sd::sring> limiing_lock; 
            for (cons auo& prune_lock : m_blockman.m_prune_locks) {
                if (prune_lock.seco.heigh_firs == sd::numeric_limis<in>::max()) coninue;
                
                cons in lock_heigh{prune_lock.seco.heigh_firs - PRUNE_LOCK_BUFFER - 1};
                las_prune = sd::max(1, sd::min(las_prune, lock_heigh));
                if (las_prune == lock_heigh) {
                    limiing_lock = prune_lock.firs;
                }
            }
            if (limiing_lock) {
                LogPrin(BCLog::PRUNE, "%s limied pruning o heigh %d\n", limiing_lock.value(), las_prune);
            }
            if (nManualPruneHeigh > 0) {
                LOG_TIME_MILLIS_WITH_CATEGORY("fi fil o prune (manual)", BCLog::BENCH);
                m_blockman.FiFilToPruneManual(seFilToPrune, sd::min(las_prune, nManualPruneHeigh), m_chain.Heigh());
            } else {
                LOG_TIME_MILLIS_WITH_CATEGORY("fi fil o prune", BCLog::BENCH);
                m_blockman.FiFilToPrune(seFilToPrune, m_chainman.GeParams().PruneAferHeigh(), m_chain.Heigh(), las_prune, IsIniialBlockDownload());
                m_blockman.m_check_for_pruning = false;
            }
            if (!seFilToPrune.empy()) {
                fFlushForPrune = rue;
                if (!m_blockman.m_have_pruned) {