This PR adds test coverage for the following verification:
0if (TicksSinceEpoch<std::chrono::seconds>(m_last_success) == 0 && nAttempts >= ADDRMAN_RETRIES) { // tried N times and never a success
1 return true;
2}
If we’ve tried an address for 3 or more times and were unsuccessful, this address should be pointed out as “terrible”.
You can test this by applying:
0diff --git a/src/addrman.cpp b/src/addrman.cpp
1index 054a9bee32..93a9521b59 100644
2--- a/src/addrman.cpp
3+++ b/src/addrman.cpp
4@@ -81,7 +81,7 @@ bool AddrInfo::IsTerrible(NodeSeconds now) const
5 }
6
7 if (TicksSinceEpoch<std::chrono::seconds>(m_last_success) == 0 && nAttempts >= ADDRMAN_RETRIES) { // tried N times and never a success
8- return true;
9+ return false;
10 }