Move variables to a new location 345/head
authorsvost <ya.nowa@yandex.ru>
Fri, 6 May 2016 18:45:06 +0000 (21:45 +0300)
committersvost <ya.nowa@yandex.ru>
Fri, 6 May 2016 18:45:06 +0000 (21:45 +0300)
src/init.cpp

index bec931d..5117dd5 100644 (file)
@@ -584,7 +584,6 @@ bool AppInit2()
         printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
     printf("Default data directory %s\n", GetDefaultDataDir().string().c_str());
     printf("Used data directory %s\n", strDataDir.c_str());
-    std::ostringstream strErrors;
 
     if (fDaemon)
         fprintf(stdout, "NovaCoin server starting\n");
@@ -595,8 +594,6 @@ bool AppInit2()
             NewThread(ThreadScriptCheck, NULL);
     }
 
-    int64_t nStart;
-
     // ********************************************************* Step 5: verify database integrity
 
     uiInterface.InitMessage(_("Verifying database integrity..."));
@@ -794,6 +791,7 @@ bool AppInit2()
 
     printf("Loading block index...\n");
     bool fLoaded = false;
+    int64_t nStart;
     while (!fLoaded) {
         std::string strLoadError;
         uiInterface.InitMessage(_("Loading block index..."));
@@ -879,6 +877,7 @@ bool AppInit2()
     uiInterface.InitMessage(_("Loading wallet..."));
     printf("Loading wallet...\n");
     nStart = GetTimeMillis();
+    std::ostringstream strErrors;
     bool fFirstRun = true;
     pwalletMain = new CWallet(strWalletFileName);
     DBErrors nLoadWalletRet = pwalletMain->LoadWallet(fFirstRun);