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 authored and MacroFake committed 2022-06-08 13:35:32 +02:00
1 parent 00001e57fe
commit 8888bd43c1
1 file changed
+2 -1
+2 -1
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;