Skip to content

Commit 5c2169c

Browse files
theunisipa
authored andcommitted
drop the optimistic write counter hack
This is now handled properly in realtime.
1 parent ea33268 commit 5c2169c

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/net.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,10 +1167,6 @@ void CConnman::ThreadSocketHandler()
11671167
{
11681168
TRY_LOCK(pnode->cs_vSend, lockSend);
11691169
if (lockSend) {
1170-
if (pnode->nOptimisticBytesWritten) {
1171-
RecordBytesSent(pnode->nOptimisticBytesWritten);
1172-
pnode->nOptimisticBytesWritten = 0;
1173-
}
11741170
if (!pnode->vSendMsg.empty()) {
11751171
FD_SET(pnode->hSocket, &fdsetSend);
11761172
continue;
@@ -2582,7 +2578,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
25822578
minFeeFilter = 0;
25832579
lastSentFeeFilter = 0;
25842580
nextSendTimeFeeFilter = 0;
2585-
nOptimisticBytesWritten = 0;
25862581

25872582
BOOST_FOREACH(const std::string &msg, getAllNetMessageTypes())
25882583
mapRecvBytesPerMsgCmd[msg] = 0;

src/net.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@ class CNode
596596
CDataStream ssSend;
597597
size_t nSendSize; // total size of all vSendMsg entries
598598
size_t nSendOffset; // offset inside the first vSendMsg already sent
599-
uint64_t nOptimisticBytesWritten;
600599
uint64_t nSendBytes;
601600
std::deque<CSerializeData> vSendMsg;
602601
CCriticalSection cs_vSend;

0 commit comments

Comments
 (0)