Browse Source

Record nMinPingUsecTime

pull/145/head
Patrick Strateman 9 years ago
committed by Taylor Hornby
parent
commit
e279e5f90a
  1. 1
      src/main.cpp
  2. 2
      src/net.h

1
src/main.cpp

@ -4937,6 +4937,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
if (pingUsecTime > 0) {
// Successful ping time measurement, replace previous
pfrom->nPingUsecTime = pingUsecTime;
pfrom->nMinPingUsecTime = std::min(pfrom->nMinPingUsecTime, pingUsecTime);
} else {
// This should never happen
sProblem = "Timing mishap";

2
src/net.h

@ -318,6 +318,8 @@ public:
int64_t nPingUsecStart;
// Last measured round-trip time.
int64_t nPingUsecTime;
// Best measured round-trip time.
int64_t nMinPingUsecTime;
// Whether a ping is requested.
bool fPingQueued;

Loading…
Cancel
Save