|
|
@ -53,11 +53,7 @@ bool CAddrInfo::IsTerrible(int64_t nNow) const |
|
|
|
double CAddrInfo::GetChance(int64_t nNow) const |
|
|
|
double CAddrInfo::GetChance(int64_t nNow) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
double fChance = 1.0; |
|
|
|
double fChance = 1.0; |
|
|
|
|
|
|
|
int64_t nSinceLastTry = std::max<int64_t>(nNow - nLastTry, 0); |
|
|
|
int64_t nSinceLastTry = nNow - nLastTry; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (nSinceLastTry < 0) |
|
|
|
|
|
|
|
nSinceLastTry = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// deprioritize very recent attempts away
|
|
|
|
// deprioritize very recent attempts away
|
|
|
|
if (nSinceLastTry < 60 * 10) |
|
|
|
if (nSinceLastTry < 60 * 10) |
|
|
|