diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 73f4e207cd..b683e66782 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -144,7 +144,6 @@ bool AppInit2(int argc, char* argv[]) if (mapArgs.count("-?") || mapArgs.count("--help")) { - string beta = VERSION_IS_BETA ? _(" beta") : ""; string strUsage = string() + _("Bitcoin version") + " " + FormatFullVersion() + "\n\n" + _("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" + @@ -159,6 +158,7 @@ bool AppInit2(int argc, char* argv[]) " -gen=0 \t\t " + _("Don't generate coins\n") + " -min \t\t " + _("Start minimized\n") + " -datadir=<dir> \t\t " + _("Specify data directory\n") + + " -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)\n") + " -proxy=<ip:port> \t " + _("Connect through socks4 proxy\n") + " -dns \t " + _("Allow DNS lookups for addnode and connect\n") + " -addnode=<ip> \t " + _("Add a node to connect to\n") + @@ -390,7 +390,7 @@ bool AppInit2(int argc, char* argv[]) { printf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight); nStart = GetTimeMillis(); - ScanForWalletTransactions(pindexRescan); + ScanForWalletTransactions(pindexRescan, true); printf(" rescan %15"PRI64d"ms\n", GetTimeMillis() - nStart); } @@ -422,6 +422,13 @@ bool AppInit2(int argc, char* argv[]) return false; } + if (mapArgs.count("-timeout")) + { + int nNewTimeout = GetArg("-timeout", 5000); + if (nNewTimeout > 0 && nNewTimeout < 600000) + nConnectTimeout = nNewTimeout; + } + if (mapArgs.count("-printblock")) { string strMatch = mapArgs["-printblock"]; |