aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp
index dbc2c41332..d2045fd84b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -4,7 +4,7 @@
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
#include "db.h"
-#include "rpc.h"
+#include "bitcoinrpc.h"
#include "net.h"
#include "init.h"
#include "strlcpy.h"
@@ -80,7 +80,7 @@ void HandleSIGTERM(int)
//
// Start
//
-#ifndef GUI
+#if !defined(QT_GUI) && !defined(GUI)
int main(int argc, char* argv[])
{
bool fRet = false;
@@ -240,10 +240,9 @@ bool AppInit2(int argc, char* argv[])
fServer = GetBoolArg("-server");
/* force fServer when running without GUI */
-#ifndef GUI
+#if !defined(QT_GUI) && !defined(GUI)
fServer = true;
#endif
-
fPrintToConsole = GetBoolArg("-printtoconsole");
fPrintToDebugger = GetBoolArg("-printtodebugger");
@@ -252,6 +251,7 @@ bool AppInit2(int argc, char* argv[])
fNoListen = GetBoolArg("-nolisten") || fTOR;
fLogTimestamps = GetBoolArg("-logtimestamps");
+#ifndef QT_GUI
for (int i = 1; i < argc; i++)
if (!IsSwitchChar(argv[i][0]))
fCommandLine = true;
@@ -261,6 +261,7 @@ bool AppInit2(int argc, char* argv[])
int ret = CommandLineRPC(argc, argv);
exit(ret);
}
+#endif
#ifndef __WXMSW__
if (fDaemon)
@@ -373,18 +374,21 @@ bool AppInit2(int argc, char* argv[])
strErrors = "";
int64 nStart;
+ InitMessage(_("Loading addresses..."));
printf("Loading addresses...\n");
nStart = GetTimeMillis();
if (!LoadAddresses())
strErrors += _("Error loading addr.dat \n");
printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart);
+ InitMessage(_("Loading block index..."));
printf("Loading block index...\n");
nStart = GetTimeMillis();
if (!LoadBlockIndex())
strErrors += _("Error loading blkindex.dat \n");
printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart);
+ InitMessage(_("Loading wallet..."));
printf("Loading wallet...\n");
nStart = GetTimeMillis();
bool fFirstRun;
@@ -415,12 +419,14 @@ bool AppInit2(int argc, char* argv[])
}
if (pindexBest != pindexRescan)
{
+ InitMessage(_("Rescanning..."));
printf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight);
nStart = GetTimeMillis();
pwalletMain->ScanForWalletTransactions(pindexRescan, true);
printf(" rescan %15"PRI64d"ms\n", GetTimeMillis() - nStart);
}
+ InitMessage(_("Done loading"));
printf("Done loading\n");
//// debug print
@@ -543,7 +549,7 @@ bool AppInit2(int argc, char* argv[])
RandAddSeedPerfmon();
if (!CreateThread(StartNode, NULL))
- wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
+ wxMessageBox(_("Error: CreateThread(StartNode) failed"), "Bitcoin");
if (fServer)
CreateThread(ThreadRPCServer, NULL);
@@ -553,7 +559,7 @@ bool AppInit2(int argc, char* argv[])
SetStartOnSystemStartup(true);
#endif
-#ifndef GUI
+#if !defined(QT_GUI) && !defined(GUI)
while (1)
Sleep(5000);
#endif