aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net.h b/src/net.h
index 03d32526bc..d779265b79 100644
--- a/src/net.h
+++ b/src/net.h
@@ -176,7 +176,7 @@ public:
CDataStream vSend;
CCriticalSection cs_vSend;
- std::vector<CNetMessage> vRecvMsg;
+ std::deque<CNetMessage> vRecvMsg;
CCriticalSection cs_vRecvMsg;
int nRecvVersion;
@@ -297,8 +297,8 @@ public:
unsigned int GetTotalRecvSize()
{
unsigned int total = 0;
- for (unsigned int i = 0; i < vRecvMsg.size(); i++)
- total += vRecvMsg[i].vRecv.size();
+ BOOST_FOREACH(const CNetMessage &msg, vRecvMsg)
+ total += msg.vRecv.size() + 24;
return total;
}
@@ -309,8 +309,8 @@ public:
void SetRecvVersion(int nVersionIn)
{
nRecvVersion = nVersionIn;
- for (unsigned int i = 0; i < vRecvMsg.size(); i++)
- vRecvMsg[i].SetVersion(nVersionIn);
+ BOOST_FOREACH(CNetMessage &msg, vRecvMsg)
+ msg.SetVersion(nVersionIn);
}
CNode* AddRef(int64 nTimeout=0)