This changes 2 things in AddrManImpl::AddSingle()
The rule not to update nTime for 1h come from a time when an update meant a database update. Now that AddrMan lives in memory it is no longer necessary, and removing it simplifies the logic. Also on master, an announcement without a penalty (i.e. a direct self-announcement) that was more than 1h newer could not increase multiplicity; now it can.
There was an existing check in
AddSingle()that prevents us from increasing theRefCountof an address when the same announcement is received again from a different peer, which regularly happens with gossip relay - an addr can take different routes through the network to us. However, the check was ineffective: when the entry was first added, itsnTimewas stored with a 2h time penalty applied, soaddr.nTime > pinfo->nTimeholds even for an identical announcement. As a result, a single announcement relayed to us by several peers could increase an address's multiplicity in the new table, up to 8. Fix this by applying the penalty in the comparison too. This is just a small logic bugfix, it doesn't change things in adversarial scenarios, since peers can just do multiple announcements with changednTimeif they want to boost theirRefCountartificially.