message: [Startup] Don't continue loading the wallet if the shutdown was requested.
diff: @@ -1411,7 +1411,7 @@ bool AppInit2()
  nCoinCacheSize = nTotalCache / 300; // coins in memory require around 300 bytes
  bool fLoaded = false;
  - while (!fLoaded) {
  + while (!fLoaded && !ShutdownRequested()) {
  bool fReset = fReindex;
  std::string strLoadError;
  @@ -1440,6 +1440,9 @@ bool AppInit2()
  if (fReindex)
  pblocktree->WriteReindexing(true);
  + // End loop if shutdown was requested
  + if (ShutdownRequested()) break;
  +
  // PIVX: load previous sessions sporks if we have them.
  uiInterface.InitMessage(_("Loading sporks..."));
  sporkManager.LoadSporksFromDB();
  @@ -1447,6 +1450,7 @@ bool AppInit2()
  uiInterface.InitMessage(_("Loading block index..."));
  std::string strBlockIndexError = "";
  if (!LoadBlockIndex(strBlockIndexError)) {
  + if (ShutdownRequested()) break;
  strLoadError = _("Error loading block database");
  strLoadError = strprintf("%s : %s", strLoadError, strBlockIndexError);
  break;
  @@ -1587,7 +1591,7 @@ bool AppInit2()
  fLoaded = true;
  } while (false);
  - if (!fLoaded) {
  + if (!fLoaded && !ShutdownRequested()) {
  // first suggest a reindex
  if (!fReset) {
  bool fRet = uiInterface.ThreadSafeMessageBox(
  @@ -1609,7 +1613,7 @@ bool AppInit2()
  // As LoadBlockIndex can take several minutes, it's possible the user
  // requested to kill the GUI during the last operation. If so, exit.
  // As the program has not fully started yet, Shutdown() is possibly overkill.
  - if (fRequestShutdown) {
  + if (ShutdownRequested()) {
  LogPrintf("Shutdown requested. Exiting.\n");
  return false;
  }
  @@ -1937,6 +1941,11 @@ bool AppInit2()
  threadGroup.create_thread(boost::bind(&ThreadCheckObfuScationPool));
  + if (ShutdownRequested()) {
  + LogPrintf("Shutdown requested. Exiting.\n");
  + return false;
  + }
  +
  // ********************************************************* Step 11: start node
  if (!CheckDiskSpace())
  