Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap) { | ||||
stats.m_ping_usec = nPingUsecTime; | stats.m_ping_usec = nPingUsecTime; | ||||
stats.m_min_ping_usec = nMinPingUsecTime; | stats.m_min_ping_usec = nMinPingUsecTime; | ||||
stats.m_ping_wait_usec = count_microseconds(ping_wait); | stats.m_ping_wait_usec = count_microseconds(ping_wait); | ||||
// Leave string empty if addrLocal invalid (not filled in yet) | // Leave string empty if addrLocal invalid (not filled in yet) | ||||
CService addrLocalUnlocked = GetAddrLocal(); | CService addrLocalUnlocked = GetAddrLocal(); | ||||
stats.addrLocal = | stats.addrLocal = | ||||
addrLocalUnlocked.IsValid() ? addrLocalUnlocked.ToString() : ""; | addrLocalUnlocked.IsValid() ? addrLocalUnlocked.ToString() : ""; | ||||
stats.m_conn_type_string = ConnectionTypeAsString(); | |||||
} | } | ||||
bool CNode::ReceiveMsgBytes(const Config &config, const char *pch, | bool CNode::ReceiveMsgBytes(const Config &config, const char *pch, | ||||
uint32_t nBytes, bool &complete) { | uint32_t nBytes, bool &complete) { | ||||
complete = false; | complete = false; | ||||
const auto time = GetTime<std::chrono::microseconds>(); | const auto time = GetTime<std::chrono::microseconds>(); | ||||
LOCK(cs_vRecv); | LOCK(cs_vRecv); | ||||
nLastRecv = std::chrono::duration_cast<std::chrono::seconds>(time).count(); | nLastRecv = std::chrono::duration_cast<std::chrono::seconds>(time).count(); | ||||
▲ Show 20 Lines • Show All 2,729 Lines • Show Last 20 Lines |