mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
[net] Change addr send times fields to be guarded by new mutex
This commit is contained in:
parent
c02fa47baa
commit
4ad4abcf07
2 changed files with 6 additions and 2 deletions
|
|
@ -4189,6 +4189,8 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
|||
CNodeState &state = *State(pto->GetId());
|
||||
|
||||
// Address refresh broadcast
|
||||
{
|
||||
LOCK(pto->m_addr_send_times_mutex);
|
||||
|
||||
if (fListen && pto->RelayAddrsWithConn() &&
|
||||
!m_chainman.ActiveChainstate().IsInitialBlockDownload() &&
|
||||
|
|
@ -4249,6 +4251,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
|||
if (pto->vAddrToSend.capacity() > 40)
|
||||
pto->vAddrToSend.shrink_to_fit();
|
||||
}
|
||||
} // pto->m_addr_send_times_mutex
|
||||
|
||||
// Start block sync
|
||||
if (pindexBestHeader == nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue