aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-11-28 22:12:33 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-28 22:15:23 +0100
commit8d26289c9a7c77c7e5cecaafebe0231cb4d69fbe (patch)
treebe57e0918417600e4a758f02338f479946bb2721 /src/net.cpp
parent92aa7311d64cb1a0109d63d6bf7406c119bf94cd (diff)
parentfa41d4c8c6e3f84a9117c0addf51a87f14321e2a (diff)
downloadbitcoin-8d26289c9a7c77c7e5cecaafebe0231cb4d69fbe.tar.xz
Merge pull request #6961
fa41d4c [qt] Move GUI related HelpMessage() part downstream (MarcoFalke) faf93f3 [trivial] Reuse translation and cleanup DEFAULT_* values (MarcoFalke) 3307bdb Bugfix: Omit wallet-related options from -help when wallet is not supported (Luke Dashjr) b966aa8 Constrain constant values to a single location in code (Luke Dashjr)
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/net.cpp b/src/net.cpp
index cff4c54505..abc7cbb8f4 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -521,12 +521,11 @@ void CNode::Ban(const CSubNet& subNet, const BanReason &banReason, int64_t banti
banEntry.banReason = banReason;
if (bantimeoffset <= 0)
{
- bantimeoffset = GetArg("-bantime", 60*60*24); // Default 24-hour ban
+ bantimeoffset = GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME);
sinceUnixEpoch = false;
}
banEntry.nBanUntil = (sinceUnixEpoch ? 0 : GetTime() )+bantimeoffset;
-
LOCK(cs_setBanned);
if (setBanned[subNet].nBanUntil < banEntry.nBanUntil)
setBanned[subNet] = banEntry;
@@ -1414,7 +1413,7 @@ void ThreadDNSAddressSeed()
{
// goal: only query DNS seeds if address need is acute
if ((addrman.size() > 0) &&
- (!GetBoolArg("-forcednsseed", false))) {
+ (!GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED))) {
MilliSleep(11 * 1000);
LOCK(cs_vNodes);
@@ -2337,8 +2336,8 @@ bool CAddrDB::Read(CAddrMan& addr)
return true;
}
-unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); }
-unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); }
+unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER); }
+unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER); }
CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNameIn, bool fInboundIn) :
ssSend(SER_NETWORK, INIT_PROTO_VERSION),