aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-10-26 17:46:20 +0100
committerWladimir J. van der Laan <[email protected]>2015-10-26 17:54:00 +0100
commit7939164d8985a499f710db2c7ce6aa80cc92d819 (patch)
treeb5d423e947f62142d46dcd3b8db09400a5407770 /src/init.cpp
parentMerge pull request #6621 (diff)
parentAdd RPC test for -maxuploadtarget (diff)
downloaddiscoin-7939164d8985a499f710db2c7ce6aa80cc92d819.tar.xz
discoin-7939164d8985a499f710db2c7ce6aa80cc92d819.zip
Merge pull request #6622
17a073a Add RPC test for -maxuploadtarget (Suhas Daftuar) 872fee3 Introduce -maxuploadtarget (Jonas Schnelli)
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index dd9259d4c..0210ac113 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -369,6 +369,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-whitebind=<addr>", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"));
strUsage += HelpMessageOpt("-whitelist=<netmask>", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") +
" " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway"));
+ strUsage += HelpMessageOpt("-maxuploadtarget=<n>", strprintf(_("Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)"), 0));
#ifdef ENABLE_WALLET
strUsage += HelpMessageGroup(_("Wallet options:"));
@@ -1174,6 +1175,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
RegisterValidationInterface(pzmqNotificationInterface);
}
#endif
+ if (mapArgs.count("-maxuploadtarget")) {
+ CNode::SetMaxOutboundTarget(GetArg("-maxuploadtarget", 0)*1024*1024);
+ }
// ********************************************************* Step 7: load block chain