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:
1 parent
00001e57fe
commit
8888bd43c1
1 file changed
+2
-1
+2
-1
@@ -66,8 +66,9 @@ int AddrInfo::GetBucketPosition(const uint256& nKey, bool fNew, int nBucket) con
|
|||||||
|
|
||||||
bool AddrInfo::IsTerrible(int64_t nNow) const
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (nTime > nNow + 10 * 60) // came in a flying DeLorean
|
if (nTime > nNow + 10 * 60) // came in a flying DeLorean
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in new issue
Block a user