We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5057adf commit fa9284cCopy full SHA for fa9284c
src/addrman.cpp
@@ -89,11 +89,11 @@ bool AddrInfo::IsTerrible(int64_t nNow) const
89
double AddrInfo::GetChance(int64_t nNow) const
90
{
91
double fChance = 1.0;
92
- int64_t nSinceLastTry = std::max<int64_t>(nNow - nLastTry, 0);
93
94
// deprioritize very recent attempts away
95
- if (nSinceLastTry < 60 * 10)
+ if (nNow - nLastTry < 60 * 10) {
96
fChance *= 0.01;
+ }
97
98
// deprioritize 66% after each failed attempt, but at most 1/28th to avoid the search taking forever or overly penalizing outages.
99
fChance *= pow(0.66, std::min(nAttempts, 8));
0 commit comments