mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Move CNode::addrLocal access behind locked accessors
This commit is contained in:
@@ -1274,7 +1274,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||
connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERACK));
|
||||
|
||||
pfrom->nServices = nServices;
|
||||
pfrom->addrLocal = addrMe;
|
||||
pfrom->SetAddrLocal(addrMe);
|
||||
{
|
||||
LOCK(pfrom->cs_SubVer);
|
||||
pfrom->strSubVer = strSubVer;
|
||||
@@ -1315,7 +1315,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||
LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
|
||||
pfrom->PushAddress(addr, insecure_rand);
|
||||
} else if (IsPeerAddrLocalGood(pfrom)) {
|
||||
addr.SetIP(pfrom->addrLocal);
|
||||
addr.SetIP(addrMe);
|
||||
LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
|
||||
pfrom->PushAddress(addr, insecure_rand);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user