LogPrint("net","send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n",PROTOCOL_VERSION,nBestHeight,addrMe.ToString(),addrYou.ToString(),id);
else
LogPrint("net","send version message: version %d, blocks=%d, us=%s, peer=%d\n",PROTOCOL_VERSION,nBestHeight,addrMe.ToString(),id);
// It is common for nodes with good ping times to suddenly become lagged,
// due to a new block arriving or other large transfer.
// Merely reporting pingtime might fool the caller into thinking the node was still responsive,
// since pingtime does not update until the ping is complete, which might take a while.
// So, if a ping is taking an unusually long time in flight,
// the caller can immediately detect that this is happening.
int64_tnPingUsecWait=0;
if((0!=nPingNonceSent)&&(0!=nPingUsecStart)){
nPingUsecWait=GetTimeMicros()-nPingUsecStart;
}
// Raw ping time is in microseconds, but show it to user as whole seconds (Bitcoin users should be well used to small numbers with many decimal places by now :)
stats.dPingTime=(((double)nPingUsecTime)/1e6);
stats.dPingMin=(((double)nMinPingUsecTime)/1e6);
stats.dPingWait=(((double)nPingUsecWait)/1e6);
// Leave string empty if addrLocal invalid (not filled in yet)