In D6308 the tasks of resetting nChainTx to 0 (for new blocks that don't yet have transactions downloaded) or to it's correct value (for connected blocks) was factored into a single UpdateChainStats function.
In a following backport of https://github.com/bitcoin/bitcoin/pull/29370/commits/ef29c8b662309a438121a83f27fd7bdd1779700c, I will have to make the resetting in ChainstateManager::ReceivedBlockTransactions conditional on the block not being a pruned block which is being downloaded again and not being the assumeutxo snapshot's base block. In BlockManager::LoadBlockIndex the resetting will be done under slighty different conditions (having parent blocks with missing transactions and not being the snapshot's base block)
Prepare for this change of behavior by splitting the resetting code from the updating code, and introducing a MaybeResetChainStats wrapper that will check for the conditions before maybe calling ResetChainStats