From c001ba45f1ec5aa7f561407618164f43a3a0b683 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Sun, 21 Jun 2020 21:50:40 -0400 Subject: [PATCH] [net] Remove unnecessary cs_sendProcessing lock annotation m_next_addr_send and m_next_local_addr_send do not need to be guarded by cs_sendProcessing. These fields are only read/writen by the message handling thread and the annotation was added unnecessarily in commit b312cd77. See discussion at https://github.com/bitcoin/bitcoin/pull/13123#issuecomment-647505130. Therefore remove this unnecessary lock annotation. --- src/net.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net.h b/src/net.h index 67d1cf0e55cd4..dd70c81c16b2e 100644 --- a/src/net.h +++ b/src/net.h @@ -546,8 +546,8 @@ class CNode std::vector vAddrToSend; std::unique_ptr m_addr_known{nullptr}; bool fGetAddr{false}; - std::chrono::microseconds m_next_addr_send GUARDED_BY(cs_sendProcessing){0}; - std::chrono::microseconds m_next_local_addr_send GUARDED_BY(cs_sendProcessing){0}; + std::chrono::microseconds m_next_addr_send{0}; + std::chrono::microseconds m_next_local_addr_send{0}; struct TxRelay { mutable RecursiveMutex cs_filter;