@@ -585,8 +585,8 @@ void CNode::CopyStats(CNodeStats& stats)
585
585
} else {
586
586
stats.fRelayTxes = false ;
587
587
}
588
- X (nLastSend );
589
- X (nLastRecv );
588
+ X (m_last_send );
589
+ X (m_last_recv );
590
590
X (nLastTXTime);
591
591
X (nLastBlockTime);
592
592
X (nTimeConnected);
@@ -633,7 +633,7 @@ bool CNode::ReceiveMsgBytes(Span<const uint8_t> msg_bytes, bool& complete)
633
633
complete = false ;
634
634
const auto time = GetTime<std::chrono::microseconds>();
635
635
LOCK (cs_vRecv);
636
- nLastRecv = std::chrono::duration_cast<std::chrono::seconds>(time).count ();
636
+ m_last_recv = std::chrono::duration_cast<std::chrono::seconds>(time).count ();
637
637
nRecvBytes += msg_bytes.size ();
638
638
while (msg_bytes.size () > 0 ) {
639
639
// absorb network data
@@ -804,7 +804,7 @@ size_t CConnman::SocketSendData(CNode& node) const
804
804
nBytes = send (node.hSocket , reinterpret_cast <const char *>(data.data ()) + node.nSendOffset , data.size () - node.nSendOffset , MSG_NOSIGNAL | MSG_DONTWAIT);
805
805
}
806
806
if (nBytes > 0 ) {
807
- node.nLastSend = GetTimeSeconds ();
807
+ node.m_last_send = GetTimeSeconds ();
808
808
node.nSendBytes += nBytes;
809
809
node.nSendOffset += nBytes;
810
810
nSentSize += nBytes;
@@ -1330,18 +1330,18 @@ bool CConnman::InactivityCheck(const CNode& node) const
1330
1330
1331
1331
if (!ShouldRunInactivityChecks (node, now)) return false ;
1332
1332
1333
- if (node.nLastRecv == 0 || node.nLastSend == 0 ) {
1334
- LogPrint (BCLog::NET, " socket no message in first %i seconds, %d %d peer=%d\n " , m_peer_connect_timeout, node.nLastRecv != 0 , node.nLastSend != 0 , node.GetId ());
1333
+ if (node.m_last_recv == 0 || node.m_last_send == 0 ) {
1334
+ LogPrint (BCLog::NET, " socket no message in first %i seconds, %d %d peer=%d\n " , m_peer_connect_timeout, node.m_last_recv != 0 , node.m_last_send != 0 , node.GetId ());
1335
1335
return true ;
1336
1336
}
1337
1337
1338
- if (now > node.nLastSend + TIMEOUT_INTERVAL) {
1339
- LogPrint (BCLog::NET, " socket sending timeout: %is peer=%d\n " , now - node.nLastSend , node.GetId ());
1338
+ if (now > node.m_last_send + TIMEOUT_INTERVAL) {
1339
+ LogPrint (BCLog::NET, " socket sending timeout: %is peer=%d\n " , now - node.m_last_send , node.GetId ());
1340
1340
return true ;
1341
1341
}
1342
1342
1343
- if (now > node.nLastRecv + TIMEOUT_INTERVAL) {
1344
- LogPrint (BCLog::NET, " socket receive timeout: %is peer=%d\n " , now - node.nLastRecv , node.GetId ());
1343
+ if (now > node.m_last_recv + TIMEOUT_INTERVAL) {
1344
+ LogPrint (BCLog::NET, " socket receive timeout: %is peer=%d\n " , now - node.m_last_recv , node.GetId ());
1345
1345
return true ;
1346
1346
}
1347
1347
0 commit comments