Steps to reproduce:

* Create a datadir that is pruned
* Start with `-prune=550 -reindex-chainstate`
* Hangs with idle CPU

(`-reindex` works)
{
    
    fs::path datadir = gArgs.GetDataDirNet();
    if (!DirIsWritable(datadir)) {
        return InitError(strprintf(_("Cannot write to data directory '%s'; check permissions."), fs::PathToString(datadir)));
    }
    if (!LockDirectory(datadir, ".lock", probeOnly)) {
        return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), fs::PathToString(datadir), PACKAGE_NAME));
    }
    return true;
}
bool AppInitSanityChecks()
{
    
    init::SetGlobals();
    if (!init::SanityChecks()) {
        return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME));
    }
    
    
    
    return LockDataDirectory(true);
}
bool AppInitLockDataDirectory()