Skip to content

Commit 681c62d

Browse files
theuniFuzzbawls
authored andcommitted
drop the optimistic write counter hack
This is now handled properly in realtime.
1 parent 9f939f3 commit 681c62d

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
@@ -1182,10 +1182,6 @@ void CConnman::ThreadSocketHandler()
11821182
// * We process a message in the buffer (message handler thread).
11831183
{
11841184
LOCK(pnode->cs_vSend);
1185-
if (pnode->nOptimisticBytesWritten) {
1186-
RecordBytesSent(pnode->nOptimisticBytesWritten);
1187-
pnode->nOptimisticBytesWritten = 0;
1188-
}
11891185
if (!pnode->vSendMsg.empty()) {
11901186
FD_SET(pnode->hSocket, &fdsetSend);
11911187
continue;
@@ -2532,7 +2528,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
25322528
nPingUsecTime = 0;
25332529
fPingQueued = false;
25342530
nMinPingUsecTime = std::numeric_limits<int64_t>::max();
2535-
nOptimisticBytesWritten = 0;
25362531
fPauseRecv = false;
25372532
nProcessQueueSize = 0;
25382533

src/net.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ class CNode
591591
CDataStream ssSend;
592592
size_t nSendSize; // total size of all vSendMsg entries
593593
size_t nSendOffset; // offset inside the first vSendMsg already sent
594-
uint64_t nOptimisticBytesWritten;
595594
uint64_t nSendBytes;
596595
std::deque<CSerializeData> vSendMsg;
597596
RecursiveMutex cs_vSend;

0 commit comments

Comments
 (0)