Skip to content

Commit

Permalink
[net] Remove unnecessary cs_sendProcessing lock annotation
Browse files Browse the repository at this point in the history
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
b312cd7. See discussion at
bitcoin#13123 (comment).

Therefore remove this unnecessary lock annotation.
  • Loading branch information
jnewbery committed Feb 28, 2021
1 parent 4b6ca4a commit c001ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ class CNode
std::vector<CAddress> vAddrToSend;
std::unique_ptr<CRollingBloomFilter> 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;
Expand Down

0 comments on commit c001ba4

Please sign in to comment.