Don't merge in re-rumours' nServices

This commit is contained in:
Pieter Wuille 2020-10-10 10:20:26 -07:00
parent 24e1cac582
commit 63ff7e40c9

8
db.cpp
View file

@ -141,12 +141,8 @@ void CAddrDb::Add_(const CAddress &addr, bool force) {
} }
if (ipToId.count(ipp)) { if (ipToId.count(ipp)) {
CAddrInfo &ai = idToInfo[ipToId[ipp]]; CAddrInfo &ai = idToInfo[ipToId[ipp]];
if (addr.nTime > ai.lastTry || ai.services != addr.nServices) if (addr.nTime > ai.lastTry) ai.lastTry = addr.nTime;
{ // Do not update ai.nServices (data from VERSION from the peer itself is better than random ADDR rumours).
ai.lastTry = addr.nTime;
ai.services |= addr.nServices;
// printf("%s: updated\n", ToString(addr).c_str());
}
if (force) { if (force) {
ai.ignoreTill = 0; ai.ignoreTill = 0;
} }