aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-01-03 18:54:50 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-22 15:43:00 +0200
commit2b1f6f9ccf36f1e0a2c9d99154e1642f796d7c2b (patch)
tree30b17fa55ea6c9ae0055c0c16d2e271a0c799d16 /src/net.cpp
parent7c4bf779e8b74e474551982a24f5acc265293abd (diff)
BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index dc83f19be4..4cbc43e4d8 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2182,7 +2182,7 @@ void CNode::RecordBytesSent(uint64_t bytes)
void CNode::SetMaxOutboundTarget(uint64_t limit)
{
LOCK(cs_totalBytesSent);
- uint64_t recommendedMinimum = (nMaxOutboundTimeframe / 600) * MAX_BLOCK_SIZE;
+ uint64_t recommendedMinimum = (nMaxOutboundTimeframe / 600) * MAX_BLOCK_SERIALIZED_SIZE;
nMaxOutboundLimit = limit;
if (limit > 0 && limit < recommendedMinimum)
@@ -2237,7 +2237,7 @@ bool CNode::OutboundTargetReached(bool historicalBlockServingLimit)
{
// keep a large enough buffer to at least relay each block once
uint64_t timeLeftInCycle = GetMaxOutboundTimeLeftInCycle();
- uint64_t buffer = timeLeftInCycle / 600 * MAX_BLOCK_SIZE;
+ uint64_t buffer = timeLeftInCycle / 600 * MAX_BLOCK_SERIALIZED_SIZE;
if (buffer >= nMaxOutboundLimit || nMaxOutboundTotalBytesSentInCycle >= nMaxOutboundLimit - buffer)
return true;
}