From f3552da81393a8e78ce3e2afed0b9c9d1ff5cee0 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Mon, 12 Sep 2016 15:04:20 -0400 Subject: net: fix maxuploadtarget setting This was broken by 63cafa6329e1a. Note that while this fixes the settings, it doesn't fix the actual usage of -maxuploadtarget completely, as there is currently a bug in the nOptimisticBytesWritten accounting that causes a delayed response if the target is reached. That bug will be addressed separately. --- src/net.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index a48ee02c44..dbed8b3dd5 100644 --- a/src/net.h +++ b/src/net.h @@ -72,6 +72,8 @@ static const size_t SETASKFOR_MAX_SZ = 2 * MAX_INV_SZ; static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125; /** The default for -maxuploadtarget. 0 = Unlimited */ static const uint64_t DEFAULT_MAX_UPLOAD_TARGET = 0; +/** The default timeframe for -maxuploadtarget. 1 day. */ +static const uint64_t MAX_UPLOAD_TIMEFRAME = 60 * 60 * 24; /** Default for blocks only*/ static const bool DEFAULT_BLOCKSONLY = false; @@ -120,6 +122,8 @@ public: CClientUIInterface* uiInterface = nullptr; unsigned int nSendBufferMaxSize = 0; unsigned int nReceiveFloodSize = 0; + uint64_t nMaxOutboundTimeframe = 0; + uint64_t nMaxOutboundLimit = 0; }; CConnman(); ~CConnman(); -- cgit v1.2.3