aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-10-08 15:34:39 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-11-28 09:36:25 +0100
commitb312cd770701aa806e9b264154646f481d212c1c (patch)
tree9af528d611dc89b32712f9fd201eda743eeaa6d7 /src/net.cpp
parent600b85bb417295f4d9c7d5b9fd8502f3c8f113e3 (diff)
Add missing locking annotations
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e065ac0f28..1e63759866 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -82,8 +82,8 @@ bool fDiscover = true;
bool fListen = true;
bool fRelayTxes = true;
CCriticalSection cs_mapLocalHost;
-std::map<CNetAddr, LocalServiceInfo> mapLocalHost;
-static bool vfLimited[NET_MAX] = {};
+std::map<CNetAddr, LocalServiceInfo> mapLocalHost GUARDED_BY(cs_mapLocalHost);
+static bool vfLimited[NET_MAX] GUARDED_BY(cs_mapLocalHost) = {};
std::string strSubVersion;
limitedmap<uint256, int64_t> mapAlreadyAskedFor(MAX_INV_SZ);
@@ -874,16 +874,7 @@ const uint256& CNetMessage::GetMessageHash() const
return data_hash;
}
-
-
-
-
-
-
-
-
-// requires LOCK(cs_vSend)
-size_t CConnman::SocketSendData(CNode *pnode) const
+size_t CConnman::SocketSendData(CNode *pnode) const EXCLUSIVE_LOCKS_REQUIRED(pnode->cs_vSend)
{
auto it = pnode->vSendMsg.begin();
size_t nSentSize = 0;