diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2019-03-01 16:15:50 -0500 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-03-09 07:13:30 +0100 |
commit | b80dedb59678b3b35a7808e3fc09cf0610170070 (patch) | |
tree | 05eb18577036c4e4ac6a09885064c318a4e20ea8 | |
parent | 333be7aabf0b8e6f64dbc8fe141d0aa18dcb6f41 (diff) |
[addrman] Improve collision logging and address nits
Github-Pull: #15486
Rebased-From: 20e6ea259b222b10f066f22695a5f56c52071f63
Tree-SHA512: 73b37a98cf4d9ede1d39c30d178d63a5a6865dba6cb7a9f33bd1e03445acb708b3007c7cde991b5de96a407262adda23279fe7a1d2ed31b0b5a33b2e97aaba9b
-rw-r--r-- | src/addrman.cpp | 4 | ||||
-rw-r--r-- | src/net.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index 45b686e1de..8a5f78d1c5 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -563,7 +563,7 @@ void CAddrMan::ResolveCollisions_() // Give address at least 60 seconds to successfully connect if (GetAdjustedTime() - info_old.nLastTry > 60) { - LogPrint(BCLog::ADDRMAN, "Swapping %s for %s in tried table\n", info_new.ToString(), info_old.ToString()); + LogPrint(BCLog::ADDRMAN, "Replacing %s with %s in tried table\n", info_old.ToString(), info_new.ToString()); // Replaces an existing address already in the tried table with the new address Good_(info_new, false, GetAdjustedTime()); @@ -573,7 +573,7 @@ void CAddrMan::ResolveCollisions_() // If the collision hasn't resolved in some reasonable amount of time, // just evict the old entry -- we must not be able to // connect to it for some reason. - LogPrint(BCLog::ADDRMAN, "Unable to test; swapping %s for %s in tried table anyway\n", info_new.ToString(), info_old.ToString()); + LogPrint(BCLog::ADDRMAN, "Unable to test; replacing %s with %s in tried table anyway\n", info_old.ToString(), info_new.ToString()); Good_(info_new, false, GetAdjustedTime()); erase_collision = true; } diff --git a/src/net.cpp b/src/net.cpp index 3f87dc6357..ccab4a1718 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1765,12 +1765,12 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect) addr = addrman.Select(fFeeler); } - // Require outbound connections to be to distinct network groups + // Require outbound connections, other than feelers, to be to distinct network groups if (!fFeeler && setConnected.count(addr.GetGroup())) { break; } - // if we selected an invalid address, restart + // if we selected an invalid or local address, restart if (!addr.IsValid() || IsLocal(addr)) { break; } |