mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 30308cc380 into merged_master (Bitcoin PR bitcoin/bitcoin#20196)
This commit is contained in:
commit
6f90a02548
12 changed files with 454 additions and 27 deletions
|
|
@ -2762,6 +2762,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||
LogPrint(BCLog::NET, "ProcessMessages: advertising address %s\n", addr.ToString());
|
||||
PushAddress(*peer, addr, insecure_rand);
|
||||
} else if (IsPeerAddrLocalGood(&pfrom)) {
|
||||
// Override just the address with whatever the peer sees us as.
|
||||
// Leave the port in addr as it was returned by GetLocalAddress()
|
||||
// above, as this is an outbound connection and the peer cannot
|
||||
// observe our listening port.
|
||||
addr.SetIP(addrMe);
|
||||
LogPrint(BCLog::NET, "ProcessMessages: advertising address %s\n", addr.ToString());
|
||||
PushAddress(*peer, addr, insecure_rand);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue