aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-01-06 08:12:28 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-01-07 09:41:34 +0100
commitfa210689e27b0d78b2fe894e51e364179db7a3ce (patch)
treee16fa7470067c2a56adcc5cd44f9f14dcc73f5a4 /src/net.h
parentfa0a71781a964d944db9ecc002675ef32249f62e (diff)
net: Move SocketSendData lock annotation to header
Also, add lock annotation to SendMessages Can be reviewed with "--word-diff-regex=."
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index 4b3a0f810e..acc1da49a5 100644
--- a/src/net.h
+++ b/src/net.h
@@ -778,7 +778,7 @@ class NetEventsInterface
{
public:
virtual bool ProcessMessages(CNode* pnode, std::atomic<bool>& interrupt) = 0;
- virtual bool SendMessages(CNode* pnode) = 0;
+ virtual bool SendMessages(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(pnode->cs_sendProcessing) = 0;
virtual void InitializeNode(CNode* pnode) = 0;
virtual void FinalizeNode(const CNode& node, bool& update_connection_time) = 0;
@@ -1057,7 +1057,7 @@ private:
NodeId GetNewNodeId();
- size_t SocketSendData(CNode *pnode) const;
+ size_t SocketSendData(CNode& node) const EXCLUSIVE_LOCKS_REQUIRED(node.cs_vSend);
void DumpAddresses();
// Network stats