aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-09-12 20:09:24 -0400
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-03 13:35:54 -0700
commit5c2169cc3f263b39ba42d66bcf014163fada2390 (patch)
treeee1bf3e109447040e883d4ba25bdfa4290b48a05 /src
parentea3326891d8c3dcbcff178b618108d657c5586a3 (diff)
drop the optimistic write counter hack
This is now handled properly in realtime.
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp5
-rw-r--r--src/net.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 2cc14a2223..2d6573f7f0 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1167,10 +1167,6 @@ void CConnman::ThreadSocketHandler()
{
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend) {
- if (pnode->nOptimisticBytesWritten) {
- RecordBytesSent(pnode->nOptimisticBytesWritten);
- pnode->nOptimisticBytesWritten = 0;
- }
if (!pnode->vSendMsg.empty()) {
FD_SET(pnode->hSocket, &fdsetSend);
continue;
@@ -2582,7 +2578,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
minFeeFilter = 0;
lastSentFeeFilter = 0;
nextSendTimeFeeFilter = 0;
- nOptimisticBytesWritten = 0;
BOOST_FOREACH(const std::string &msg, getAllNetMessageTypes())
mapRecvBytesPerMsgCmd[msg] = 0;
diff --git a/src/net.h b/src/net.h
index 559c22bbd3..3f9efbbea3 100644
--- a/src/net.h
+++ b/src/net.h
@@ -596,7 +596,6 @@ public:
CDataStream ssSend;
size_t nSendSize; // total size of all vSendMsg entries
size_t nSendOffset; // offset inside the first vSendMsg already sent
- uint64_t nOptimisticBytesWritten;
uint64_t nSendBytes;
std::deque<CSerializeData> vSendMsg;
CCriticalSection cs_vSend;