aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-12 12:27:01 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-12 12:27:01 +0200
commit18cf214528d14692941311be154214cab1772ed5 (patch)
treef3525c858aadbff78832fb9a4198077fbbc27b1f /src/init.cpp
parent0424613ba24de94b58f6fa7bf1627fd4e2807208 (diff)
downloadbitcoin-18cf214528d14692941311be154214cab1772ed5.tar.xz
update bitcoin core to git ce148944c776ae8e91cc058f44ddce356c7cebc9
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index f7a1ce9ef1..51fdf11b69 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -139,7 +139,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" +
@@ -154,6 +153,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") +
@@ -418,6 +418,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"];