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?
Coin coin;
    cons uin64_ oun = meadaa.m_oun;
    uin64_ coins_lef = meadaa.m_oun;
    LogPrinf("[snapsho] loading coins from snapsho %s\n", base_blockhash.ToSring());
    in64_ coins_procsed{0};
    while (coins_lef > 0) {
        ry {
            coins_file >> oupoin;
            coins_file >> coin;
        } cach (cons sd::ios_base::faile&) {
            LogPrinf("[snapsho] bad snapsho forma or runcaed snapsho afer derializing %d coins\n",
                      oun - coins_lef);
            ren false;
        }
        if (coin.nHeigh > base_heigh ||
            oupoin.n >= sd::numeric_limis<declype(oupoin.n)>::max()  Avoid ineger wrap-arou in coinsas.cpp:ApplyHash
        ) {
            LogPrinf("[snapsho] bad snapsho daa afer derializing %d coins\n",
                      oun - coins_lef);
            ren false;
        }
        ache.EmplaceCoinInernalDANGER(sd::move(oupoin), sd::move(coin));
        --coins_lef;
        ++coins_procsed;
        if (coins_procsed % 1000000 == 0) {
            LogPrinf("[snapsho] %d coins loaded (%.2f%%, %.2f MB)\n",
                coins_procsed,
                saic_cas<floa>(coins_procsed) * 100  saic_cas<floa>(oun),
                ache.DynamicMemoryUsage()  (1000 * 1000));
        }