aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-02-02 18:11:01 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-20 20:29:16 -0500
commitfa71eb5196fc157213d7b6364071530ab19df724 (patch)
treef2a5f14ec10c389633b66beed5808ab10fdf6da0 /src/net.h
parent6d58a5c3b05585b01c960776e00856637ff1794d (diff)
Convert comments to thread safety annotations
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/net.h b/src/net.h
index 164ec9080c..32cc02f5a9 100644
--- a/src/net.h
+++ b/src/net.h
@@ -677,10 +677,10 @@ public:
// a) it allows us to not relay tx invs before receiving the peer's version message
// b) the peer may tell us in its version message that we should not relay tx invs
// unless it loads a bloom filter.
- bool fRelayTxes; //protected by cs_filter
+ bool fRelayTxes GUARDED_BY(cs_filter);
bool fSentAddr;
CSemaphoreGrant grantOutbound;
- CCriticalSection cs_filter;
+ mutable CCriticalSection cs_filter;
std::unique_ptr<CBloomFilter> pfilter;
std::atomic<int> nRefCount;
@@ -718,10 +718,9 @@ public:
std::multimap<int64_t, CInv> mapAskFor;
int64_t nNextInvSend;
// Used for headers announcements - unfiltered blocks to relay
- // Also protected by cs_inventory
- std::vector<uint256> vBlockHashesToAnnounce;
- // Used for BIP35 mempool sending, also protected by cs_inventory
- bool fSendMempool;
+ std::vector<uint256> vBlockHashesToAnnounce GUARDED_BY(cs_inventory);
+ // Used for BIP35 mempool sending
+ bool fSendMempool GUARDED_BY(cs_inventory);
// Last time a "MEMPOOL" request was serviced.
std::atomic<int64_t> timeLastMempoolReq;