> validation: assumeutxo: swap m_mempool on snapshot activation
>
> Otherwise we will not receive transactions during background sync until restart.
https://github.com/bitcoin/bitcoin/pull/27596/commits/9511fb3616b7bbe1d0d2f54a45ea0a650ba0367b
And swap it back before deleting the snapshot chainstate:
> init, validation: Fix -reindex option with an existing snapshot
>
> This didn't work for two reasons:
> 1.) GetSnapshotCoinsDBPath() was used to retrieve the path.
> This requires coins_views to exist, but the initialisation only happens later
> (in CompleteChainstateInitialization) so the node hits an assert in
> CCoinsViewDB& CoinsDB() and crashes.
>
> 2.) The snapshot was already activated, so it has the mempool attached.
> Therefore, the mempool needs to be transferred back to the ibd
> chainstate before deleting the snapshot chainstate.
https://github.com/bitcoin/bitcoin/pull/29726/commits/e57f951805b429534c75ec1e6b2a1f16ae24efb5
A functional test for core#29726 is added later, when we can test assumeutxo (requires loadtxoutset)
This is a partial backport of core#27596 and core#29726
Depends on D17896