mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Move CNode::addrLocal access behind locked accessors
This commit is contained in:
parent
036073bf87
commit
db2dc7a58c
3 changed files with 29 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue