`RewindBlockIndex` was made to allow nodes upgrading to new consensus rules post-segwit fork to 
download new consensus data (i.e witnesses) without having to go through a whole IBD. It has been pointed than now really few pre-segwit nodes care to upgrade and that this logic may be irrelevant.

See https://github.com/bitcoin/bitcoin/pull/17737#discussion_r358514335 in review  of #17737 for more context pointers.
* other transactions from the mempool that are no longer valid given the new
 * tip/height.
 *
 * Note: we assume that disconnectpool only contains transactions that are NOT
 * confirmed in the current chain nor already in the mempool (otherwise,
 * in-mempool descendants of such transactions would be removed).
 *
 * Passing fAddToMempool=false will skip trying to add the transactions back,
 * and instead just erase from the mempool as needed.
 */
static void UpdateMempoolForReorg(CChainState& active_chainstate, CTxMemPool& mempool, DisconnectedBlockTransactions& disconnectpool, bool fAddToMempool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, mempool.cs)
{
    AssertLockHeld(cs_main);
    AssertLockHeld(mempool.cs);
    assert(std::addressof(::ChainstateActive()) == std::addressof(active_chainstate));
    std::vector<uint256> vHashUpdate;
    
    
    
    
    
    
    auto it = disconnectpool.queuedTx.get<insertion_order>().rbegin();
    while (it != disconnectpool.queuedTx.get<insertion_order>().rend()) {
        
        if (!fAddToMempool || (*it)->IsCoinBase() ||
            AcceptToMemoryPool(active_chainstate, mempool, *it, true ).m_result_type != MempoolAcceptResult::ResultType::VALID) {
            
            
            mempool.removeRecursive(**it, MemPoolRemovalReason::REORG);