mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-18 11:01:06 +00:00
Record nMinPingUsecTime
This commit is contained in:
parent
ae037b707c
commit
4bac601610
@ -4522,6 +4522,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
if (pingUsecTime > 0) {
|
if (pingUsecTime > 0) {
|
||||||
// Successful ping time measurement, replace previous
|
// Successful ping time measurement, replace previous
|
||||||
pfrom->nPingUsecTime = pingUsecTime;
|
pfrom->nPingUsecTime = pingUsecTime;
|
||||||
|
pfrom->nMinPingUsecTime = std::min(pfrom->nMinPingUsecTime, pingUsecTime);
|
||||||
} else {
|
} else {
|
||||||
// This should never happen
|
// This should never happen
|
||||||
sProblem = "Timing mishap";
|
sProblem = "Timing mishap";
|
||||||
|
@ -395,6 +395,8 @@ public:
|
|||||||
int64_t nPingUsecStart;
|
int64_t nPingUsecStart;
|
||||||
// Last measured round-trip time.
|
// Last measured round-trip time.
|
||||||
int64_t nPingUsecTime;
|
int64_t nPingUsecTime;
|
||||||
|
// Best measured round-trip time.
|
||||||
|
int64_t nMinPingUsecTime;
|
||||||
// Whether a ping is requested.
|
// Whether a ping is requested.
|
||||||
bool fPingQueued;
|
bool fPingQueued;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user