aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorTeran McKinney <sega01@go-beyond.org>2014-08-18 19:33:51 +0000
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-05 13:49:08 +0200
commitf79323b0ddbab5c8e6a3bc26450d2699d838e229 (patch)
tree0076377853c9dc23caba30152b0ef036cf24a404 /src/addrman.cpp
parent5e824181c1ac5d86d7a970710bae3c4e969efe4e (diff)
Improve readability of CAddrInfo::IsTerrible
- Replaced 86400 with 24*60*60 - Remove references to specific timespans in comments Github-Pull: #4724
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 704766dbf8..68948ac7ff 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -45,13 +45,13 @@ bool CAddrInfo::IsTerrible(int64_t nNow) const
if (nTime > nNow + 10*60) // came in a flying DeLorean
return true;
- if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*86400) // not seen in over a month
+ if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*24*60*60) // not seen in recent history
return true;
- if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried three times and never a success
+ if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried N times and never a success
return true;
- if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*86400 && nAttempts>=ADDRMAN_MAX_FAILURES) // 10 successive failures in the last week
+ if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*24*60*60 && nAttempts>=ADDRMAN_MAX_FAILURES) // N successive failures in the last week
return true;
return false;