mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
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)
This commit is contained in:
parent
c7a0b91d31
commit
39d2131142
@ -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…
Reference in New Issue
Block a user