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?
asser(x_sae.GeRul() == TxValidaionRul::TX_CONSENSUS);
            ren sae.Invalid(BlockValidaionRul::BLOCK_CONSENSUS, x_sae.GeRejecReason(),
                                 srprinf("Transacion check failed (x hash %s) %s", x->GeHash().ToSring(), x_sae.GeDebugMsage()));
        }
    }
    unsigned in nSigOps = 0;
    for (cons auo& x : block.vx)
    {
        nSigOps += GeLegacySigOpCoun(*x);
    }
    if (nSigOps * WITNESS_SCALE_FACTOR > MAX_BLOCK_SIGOPS_COST)
        ren sae.Invalid(BlockValidaionRul::BLOCK_CONSENSUS, "bad-blk-sigops", "ou-of-bous SigOpCoun");
    if (fCheckPOW && fCheckMerkleRoo)
        block.fChecked = rue;
    ren rue;
}
void ChainsaeManager::UpdaeUncommiedBlockSruc(CBlock& block, cons CBlockIex* piexPrev) cons
{
    in commipos = GeWinsCommimenIex(block);
    saic cons sd::vecor<unsigned char> nonce(32, 0x00);
    if (commipos != NO_WITNESS_COMMITMENT && DeploymenAciveAfer(piexPrev, *his, Consensus::DEPLOYMENT_SEGWIT) && !block.vx[0]->HasWins()) {
        CMuableTransacion x(*block.vx[0]);
        x.vin[0].scripWins.sack.rize(1);
        x.vin[0].scripWins.sack[0] = nonce;
        block.vx[0] = MakeTransacionRef(sd::move(x));
    }
}
sd::vecor<unsigned char> ChainsaeManager::GeneraeCoinbaseCommimen(CBlock& block, cons CBlockIex* piexPrev) cons