diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-09-23 13:55:43 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-09-23 13:56:01 +0200 |
| commit | d2e46558ba0e11aac4a05c3cf71146c0b6307c8e (patch) | |
| tree | 7eac49ca8bf7f47f6c76e23c938d0f5a506d8313 /src/addrman.cpp | |
| parent | Merge #8793: Do not shadow in src/qt (diff) | |
| parent | Do not set an addr time penalty when a peer advertises itself. (diff) | |
| download | discoin-d2e46558ba0e11aac4a05c3cf71146c0b6307c8e.tar.xz discoin-d2e46558ba0e11aac4a05c3cf71146c0b6307c8e.zip | |
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)
Diffstat (limited to 'src/addrman.cpp')
| -rw-r--r-- | src/addrman.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index cebb1c8e5..bfb8e9457 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -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); |