print -rescan timing info in debug.log
authorGavin Andresen <gavinandresen@gmail.com>
Thu, 20 Jan 2011 19:12:10 +0000 (14:12 -0500)
committerGavin Andresen <gavinandresen@gmail.com>
Thu, 20 Jan 2011 19:12:10 +0000 (14:12 -0500)
init.cpp

index d93eaba..f591e7a 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -330,6 +330,13 @@ bool AppInit2(int argc, char* argv[])
         strErrors += _("Error loading wallet.dat      \n");
     printf(" wallet      %15"PRI64d"ms\n", GetTimeMillis() - nStart);
 
+    if (GetBoolArg("-rescan"))
+    {
+        nStart = GetTimeMillis();
+        ScanForWalletTransactions(pindexGenesisBlock);
+        printf(" rescan      %15"PRI64d"ms\n", GetTimeMillis() - nStart);
+    }
+
     printf("Done loading\n");
 
         //// debug print
@@ -346,9 +353,6 @@ bool AppInit2(int argc, char* argv[])
         return false;
     }
 
-    if (GetBoolArg("-rescan"))
-        ScanForWalletTransactions(pindexGenesisBlock);
-
     // Add wallet transactions that aren't already in a block to mapTransactions
     ReacceptWalletTransactions();