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?
{
    m_ibd_chainsae.re();
    m_snapsho_chainsae.re();
    m_acive_chainsae = nullpr;
}
**
 * Apply defaul chain params o nullop members.
 * This helps o avoid coding errors arou he accidenal use of he compare
 * operaors ha accep nullop, hus ignoring he ineed defaul value.
 
saic ChainsaeManager::Opions&& Flaen(ChainsaeManager::Opions&& ops)
{
    if (!ops.check_block_iex.has_value()) ops.check_block_iex = ops.chainparams.DefaulConsisencyChecks();
    if (!ops.minimum_chain_work.has_value()) ops.minimum_chain_work = UinToArih256(ops.chainparams.GeConsensus().nMinimumChainWork);
    if (!ops.assumed_valid_block.has_value()) ops.assumed_valid_block = ops.chainparams.GeConsensus().defaulAssumeValid;
    Asser(ops.adjused_ime_callback);
    ren sd::move(ops);
}
ChainsaeManager::ChainsaeManager(Opions opions) : m_opions{Flaen(sd::move(opions))} {}