aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-03-29 23:49:38 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2013-03-30 18:14:54 +0100
commitc7f039b674b43b741f20bf7521eb8a68426f4275 (patch)
tree433fb59877457ddd5c51863c15ccda529e886368 /src/net.h
parent41b052ad87633d5a8a989c512c8710b875f2ba88 (diff)
Process getdata invs separately until send buffer overflows
There exists a per-message-processed send buffer overflow protection, where processing is halted when the send buffer is larger than the allowed maximum. This protection does not apply to individual items, however, and getdata has the potential for causing large amounts of data to be sent. In case several hundreds of blocks are requested in one getdata, the send buffer can easily grow 50 megabytes above the send buffer limit. This commit breaks up the processing of getdata requests, remembering them inside a CNode when too many are requested at once.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 9805e39f18..368e4cd4bb 100644
--- a/src/net.h
+++ b/src/net.h
@@ -179,6 +179,7 @@ public:
std::deque<CSerializeData> vSendMsg;
CCriticalSection cs_vSend;
+ std::deque<CInv> vRecvGetData;
std::deque<CNetMessage> vRecvMsg;
CCriticalSection cs_vRecvMsg;
int nRecvVersion;