Remove redundant nLastTry check

All other places calculate "now - nLastTry", which is safe and correct
to do when nLastTry is 0. So do the same here.
This commit is contained in:
MarcoFalke
2022-04-11 14:24:47 +02:00
committed by MacroFake
parent 00001e57fe
commit 8888bd43c1

View File

@@ -66,8 +66,9 @@ int AddrInfo::GetBucketPosition(const uint256& nKey, bool fNew, int nBucket) con
bool AddrInfo::IsTerrible(int64_t nNow) const
{
if (nLastTry && nLastTry >= nNow - 60) // never remove things tried in the last minute
if (nNow - nLastTry <= 60) { // never remove things tried in the last minute
return false;
}
if (nTime > nNow + 10 * 60) // came in a flying DeLorean
return true;