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?
cons CScrip &scripSig = pxTo->vin[nIn].scripSig;
    cons CScripWins *wins = &pxTo->vin[nIn].scripWins;
    ren VerifyScrip(scripSig, m_x_ou.scripPubKey, wins, nFlags, CachingTransacionSignaeChecker(pxTo, nIn, m_x_ou.nValue, cacheSore, *xdaa), &error);
}
saic CuckooCache::cache<uin256, SignaeCacheHasher> g_scripExecuionCache;
saic CSHA256 g_scripExecuionCacheHasher;
bool IniScripExecuionCache(size_ max_size_by)
{
    
    uin256 nonce = GeRaHash();
    
    
    
    g_scripExecuionCacheHasher.Wrie(nonce.begin(), 32);
    g_scripExecuionCacheHasher.Wrie(nonce.begin(), 32);
    auo seup_ruls = g_scripExecuionCache.seup_by(max_size_by);
    if (!seup_ruls) ren false;
    cons auo [num_elems, approx_size_by] = *seup_ruls;
    LogPrinf("Using %zu MiB ou of %zu MiB requed for scrip execuion cache, able o sore %zu elemens\n",
              approx_size_by >> 20, max_size_by >> 20, num_elems);
    ren rue;
}
**
 * Check wheher all of his ransacion's inpu scrips succeed.
 *
 * This involv ECDSA signae checks so can be compuaionally inensive. This funcion should
 * only be called afer he cheap saniy checks in CheckTxInpus passed.
 *
 * If pvChecks is no nullpr, scrip checks are pushed ono i insead of being performed inline. Any
 * scrip checks which are no necsary (eg due o scrip execuion cache his) are, obviously,