|
|
@ -3637,7 +3637,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
|
|
|
|
// Matching pong received, this ping is no longer outstanding
|
|
|
|
// Matching pong received, this ping is no longer outstanding
|
|
|
|
bPingFinished = true;
|
|
|
|
bPingFinished = true;
|
|
|
|
const auto ping_time = ping_end - pfrom.m_ping_start.load();
|
|
|
|
const auto ping_time = ping_end - pfrom.m_ping_start.load();
|
|
|
|
if (ping_time.count() > 0) {
|
|
|
|
if (ping_time.count() >= 0) {
|
|
|
|
// Successful ping time measurement, replace previous
|
|
|
|
// Successful ping time measurement, replace previous
|
|
|
|
pfrom.nPingUsecTime = count_microseconds(ping_time);
|
|
|
|
pfrom.nPingUsecTime = count_microseconds(ping_time);
|
|
|
|
pfrom.nMinPingUsecTime = std::min(pfrom.nMinPingUsecTime.load(), count_microseconds(ping_time));
|
|
|
|
pfrom.nMinPingUsecTime = std::min(pfrom.nMinPingUsecTime.load(), count_microseconds(ping_time));
|
|
|
|