X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Finit.cpp;h=14db9e7f5ea4066f3fba7d44ee7a7e6f8c43ff8a;hb=871c3557bf08dd29c6d2ffd10e854bbd0478b3b5;hp=0eb37fe99cf0b1262512ce7b0a111bb96405ef4c;hpb=ac4161e25df2a9475abb0f62d32a7d86d6baff0f;p=novacoin.git diff --git a/src/init.cpp b/src/init.cpp index 0eb37fe..14db9e7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -353,6 +353,15 @@ bool AppInit2(int argc, char* argv[]) nStart = GetTimeMillis(); if (!LoadBlockIndex()) strErrors << _("Error loading blkindex.dat") << "\n"; + + // as LoadBlockIndex can take several minutes, it's possible the user + // requested to kill bitcoin-qt during the last operation. If so, exit. + // As the program has not fully started yet, Shutdown() is possibly overkill. + if (fRequestShutdown) + { + printf("Shutdown requested. Exiting.\n"); + return false; + } printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart); InitMessage(_("Loading wallet..."));