diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-09-19 16:46:18 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-09-19 16:46:50 +0200 |
commit | f07424a6716c1fc37dc7a4d66d8efcdbba975852 (patch) | |
tree | 77b48bb374ca44b1a45b1480f3aea057fe41b441 /src/init.cpp | |
parent | 9ac01301f5c45698a5db356da9e8dbc1500f7c31 (diff) | |
parent | f3552da81393a8e78ce3e2afed0b9c9d1ff5cee0 (diff) |
Merge #8707: net: fix maxuploadtarget setting
f3552da net: fix maxuploadtarget setting (Cory Fields)
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 32b1719258..8a95296bcf 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1249,8 +1249,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) RegisterValidationInterface(pzmqNotificationInterface); } #endif + uint64_t nMaxOutboundLimit = 0; //unlimited unless -maxuploadtarget is set + uint64_t nMaxOutboundTimeframe = MAX_UPLOAD_TIMEFRAME; + if (mapArgs.count("-maxuploadtarget")) { - connman.SetMaxOutboundTarget(GetArg("-maxuploadtarget", DEFAULT_MAX_UPLOAD_TARGET)*1024*1024); + nMaxOutboundLimit = GetArg("-maxuploadtarget", DEFAULT_MAX_UPLOAD_TARGET)*1024*1024; } // ********************************************************* Step 7: load block chain @@ -1533,6 +1536,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) connOptions.nSendBufferMaxSize = 1000*GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER); connOptions.nReceiveFloodSize = 1000*GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER); + connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe; + connOptions.nMaxOutboundLimit = nMaxOutboundLimit; + if(!connman.Start(threadGroup, scheduler, strNodeError, connOptions)) return InitError(strNodeError); |