File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -548,8 +548,9 @@ class CNode
548
548
std::vector<CAddress> vAddrToSend;
549
549
std::unique_ptr<CRollingBloomFilter> m_addr_known{nullptr };
550
550
bool fGetAddr {false };
551
- std::chrono::microseconds m_next_addr_send GUARDED_BY (cs_sendProcessing){0 };
552
- std::chrono::microseconds m_next_local_addr_send GUARDED_BY (cs_sendProcessing){0 };
551
+ Mutex m_addr_send_times_mutex;
552
+ std::chrono::microseconds m_next_addr_send GUARDED_BY (m_addr_send_times_mutex){0 };
553
+ std::chrono::microseconds m_next_local_addr_send GUARDED_BY (m_addr_send_times_mutex){0 };
553
554
554
555
struct TxRelay {
555
556
mutable RecursiveMutex cs_filter;
Original file line number Diff line number Diff line change @@ -4189,6 +4189,8 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
4189
4189
CNodeState &state = *State (pto->GetId ());
4190
4190
4191
4191
// Address refresh broadcast
4192
+ {
4193
+ LOCK (pto->m_addr_send_times_mutex );
4192
4194
4193
4195
if (fListen && pto->RelayAddrsWithConn () &&
4194
4196
!m_chainman.ActiveChainstate ().IsInitialBlockDownload () &&
@@ -4249,6 +4251,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
4249
4251
if (pto->vAddrToSend .capacity () > 40 )
4250
4252
pto->vAddrToSend .shrink_to_fit ();
4251
4253
}
4254
+ } // pto->m_addr_send_times_mutex
4252
4255
4253
4256
// Start block sync
4254
4257
if (pindexBestHeader == nullptr )
You can’t perform that action at this time.
0 commit comments