aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2022-09-20 12:51:30 +0100
committerdergoegge <n.goeggi@gmail.com>2023-03-30 14:56:19 +0200
commit938a8e2566bf2f819adeb75a08c0c8ba9a85fe1c (patch)
tree10f72fca2dbb94a54e76cd39760db9f17d85c0f1 /src
parent8a2cb1f749ade31bb0655567cd0062db8a7164e5 (diff)
downloadbitcoin-938a8e2566bf2f819adeb75a08c0c8ba9a85fe1c.tar.xz
[net processing] Annotate m_recently_announced_invs as guarded by g_msgproc_mutex
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index f6fa9e25c3..9353f95086 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -482,7 +482,7 @@ struct CNodeState {
const bool m_is_inbound;
//! A rolling bloom filter of all announced tx CInvs to this peer.
- CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001};
+ CRollingBloomFilter m_recently_announced_invs GUARDED_BY(NetEventsInterface::g_msgproc_mutex){INVENTORY_MAX_RECENT_RELAY, 0.000001};
CNodeState(bool is_inbound) : m_is_inbound(is_inbound) {}
};
@@ -904,10 +904,12 @@ private:
std::atomic<std::chrono::seconds> m_last_tip_update{0s};
/** Determine whether or not a peer can request a transaction, and return it (or nullptr if not found or not allowed). */
- CTransactionRef FindTxForGetData(const CNode& peer, const GenTxid& gtxid, const std::chrono::seconds mempool_req, const std::chrono::seconds now) LOCKS_EXCLUDED(cs_main);
+ CTransactionRef FindTxForGetData(const CNode& peer, const GenTxid& gtxid, const std::chrono::seconds mempool_req, const std::chrono::seconds now)
+ LOCKS_EXCLUDED(cs_main) EXCLUSIVE_LOCKS_REQUIRED(NetEventsInterface::g_msgproc_mutex);
void ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic<bool>& interruptMsgProc)
- EXCLUSIVE_LOCKS_REQUIRED(!m_most_recent_block_mutex, peer.m_getdata_requests_mutex) LOCKS_EXCLUDED(::cs_main);
+ EXCLUSIVE_LOCKS_REQUIRED(!m_most_recent_block_mutex, peer.m_getdata_requests_mutex, NetEventsInterface::g_msgproc_mutex)
+ LOCKS_EXCLUDED(::cs_main);
/** Process a new block. Perform any post-processing housekeeping */
void ProcessBlock(CNode& node, const std::shared_ptr<const CBlock>& block, bool force_processing, bool min_pow_checked);