After 9406696
AddAddress doesn't update the nServices and the nTime in the mapAddresses when the address is already present.
The new code:
addrFound = (*it).second;
if ((addrFound.nServices | addr.nServices) != addrFound.nServices)
{
// Services have been added
addrFound.nServices |= addr.nServices;
fUpdated = true;
}
The old code
CAddress& addrFound = (*it).second;
if ((addrFound.nServices | addr.nServices) != addrFound.nServices)
{
// Services have been added
addrFound.nServices |= addr.nServices;
fUpdated = true;
}
where (*it) is an iterator on the mapAddresses (there is a second if block after this one that modifies addrFound.nTime, but to show the problem it isn't important)
The difference is in the & of addrFound. Before when we modified addrFound we modified the "live" version of the mapAddresses, now we modify a copy that will be discarded at the end of the function.
After 9406696
AddAddress doesn't update the nServices and the nTime in the mapAddresses when the address is already present.
The new code:
The old code
where (*it) is an iterator on the mapAddresses (there is a second if block after this one that modifies addrFound.nTime, but to show the problem it isn't important)
The difference is in the & of addrFound. Before when we modified addrFound we modified the "live" version of the mapAddresses, now we modify a copy that will be discarded at the end of the function.