`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.
for (CChainState* chainstate : chainman.GetAll()) {
                uiInterface.InitMessage(_("Pruning blockstore...").translated);
                chainstate->PruneAndFlush();
            }
        }
    }
    if (chainparams.GetConsensus().SegwitHeight != std::numeric_limits<int>::max()) {
        
        
        nLocalServices = ServiceFlags(nLocalServices | NODE_WITNESS);
    }
    
    if (!CheckDiskSpace(GetDataDir())) {
        InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir()));
        return false;
    }
    if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) {
        InitError(strprintf(_("Error: Disk space is low for %s"), gArgs.GetBlocksDirPath()));
        return false;
    }
    
    
    boost::signals2::connection block_notify_genesis_wait_connection;
    if (::ChainActive().Tip() == nullptr) {
        block_notify_genesis_wait_connection = uiInterface.NotifyBlockTip_connect(std::bind(BlockNotifyGenesisWait, std::placeholders::_2));
    } else {
        fHaveGenesis = true;
    }
#if HAVE_SYSTEM
    const std::string block_notify = args.GetArg("-blocknotify", "");