mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
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:
parent
00001e57fe
commit
8888bd43c1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user