Skip to content

Commit

Permalink
Add missing lock annotations
Browse files Browse the repository at this point in the history
These variables are already guarded by cs_vSend, they are just missing
the annotations.
  • Loading branch information
troygiorshev committed Nov 3, 2020
1 parent 75e6280 commit 92897d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net.h
Expand Up @@ -759,8 +759,8 @@ class CNode
// socket
std::atomic<ServiceFlags> nServices{NODE_NONE};
SOCKET hSocket GUARDED_BY(cs_hSocket);
size_t nSendSize{0}; // total size of all vSendMsg entries
size_t nSendOffset{0}; // offset inside the first vSendMsg already sent
size_t nSendSize GUARDED_BY(cs_vSend){0}; // total size of all vSendMsg entries
size_t nSendOffset GUARDED_BY(cs_vSend){0}; // offset inside the first vSendMsg already sent
uint64_t nSendBytes GUARDED_BY(cs_vSend){0};
std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
RecursiveMutex cs_vSend;
Expand Down Expand Up @@ -817,7 +817,7 @@ class CNode
std::atomic_bool fPauseSend{false};

protected:
mapMsgCmdSize mapSendBytesPerMsgCmd;
mapMsgCmdSize mapSendBytesPerMsgCmd GUARDED_BY(cs_vSend);
mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv);

public:
Expand Down

0 comments on commit 92897d4

Please sign in to comment.