From 5c2169cc3f263b39ba42d66bcf014163fada2390 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Mon, 12 Sep 2016 20:09:24 -0400 Subject: [PATCH] drop the optimistic write counter hack This is now handled properly in realtime. --- src/net.cpp | 5 ----- src/net.h | 1 - 2 files changed, 6 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 2cc14a222..2d6573f7f 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 559c22bbd..3f9efbbea 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 vSendMsg; CCriticalSection cs_vSend;