Browse Source

Merge #8661: Do not set an addr time penalty when a peer advertises itself.

6d0ced1 Do not set an addr time penalty when a peer advertises itself. (Gregory Maxwell)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
d2e46558ba
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 5
      src/addrman.cpp

5
src/addrman.cpp

@ -255,6 +255,11 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP @@ -255,6 +255,11 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP
int nId;
CAddrInfo* pinfo = Find(addr, &nId);
// Do not set a penality for a source's self-announcement
if (addr == source) {
nTimePenalty = 0;
}
if (pinfo) {
// periodically update nTime
bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60);

Loading…
Cancel
Save