diff options
author | John Newbery <john@johnnewbery.com> | 2021-03-29 11:36:19 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-03-29 12:15:23 +0100 |
commit | 4ad4abcf07efefafd439b28679dff8d6bbf62943 (patch) | |
tree | 849b342a78caddc23bce900179e4193348c73965 /src/net_processing.cpp | |
parent | c02fa47baa517e17b5c43bde3902b1e410c1b93f (diff) | |
download | bitcoin-4ad4abcf07efefafd439b28679dff8d6bbf62943.tar.xz |
[net] Change addr send times fields to be guarded by new mutex
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 9f9af0aa33..359b7d9843 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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) |