Skip to content

Commit

Permalink
net: No longer send local address in addrMe
Browse files Browse the repository at this point in the history
After bitcoin#8594 the addrFrom sent by a node is not used anymore at all,
so don't bother sending it.

Also mitigates the privacy issue in (bitcoin#8616). It doesn't completely solve
the issue as GetLocalAddress is also called in AdvertiseLocal, but at
least when advertising addresses it stands out less as *our* address.
  • Loading branch information
laanwj authored and Fuzzbawls committed Aug 19, 2020
1 parent 15d124e commit c79ac2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Expand Up @@ -483,7 +483,7 @@ void CNode::PushVersion()
{
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices));
CAddress addrMe = GetLocalAddress(&addr, nLocalServices);
CAddress addrMe = CAddress(CService(), nLocalServices);
if (fLogIPs)
LogPrint(BCLog::NET, "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nMyStartingHeight, addrMe.ToString(), addrYou.ToString(), id);
else
Expand Down

0 comments on commit c79ac2a

Please sign in to comment.