aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-12-19 10:27:24 +0000
committerJohn Newbery <john@johnnewbery.com>2020-12-20 10:06:14 +0000
commit3002b4af2b4fde63026f8f7c575452a5c989c662 (patch)
treec4e3cae21eacc9b19254ba361379c594efcb0000 /src/net_processing.h
parent184557e8e03f76ff18dacdb32c12692d8578691f (diff)
downloadbitcoin-3002b4af2b4fde63026f8f7c575452a5c989c662.tar.xz
[net processing] Guard m_continuation_block with m_block_inv_mutex
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 32c5043a9d..f1f01f9139 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -73,14 +73,14 @@ struct Peer {
* message. If we can't announce via a `headers` message, we'll fall back to
* announcing via `inv`. */
std::vector<uint256> m_blocks_for_headers_relay GUARDED_BY(m_block_inv_mutex);
-
- /** This peer's reported block height when we connected */
- std::atomic<int> m_starting_height{-1};
/** The final block hash that we sent in an `inv` message to this peer.
* When the peer requests this block, we send an `inv` message to trigger
* the peer to request the next sequence of block hashes.
* Most peers use headers-first syncing, which doesn't use this mechanism */
- uint256 m_continuation_block{};
+ uint256 m_continuation_block GUARDED_BY(m_block_inv_mutex) {};
+
+ /** This peer's reported block height when we connected */
+ std::atomic<int> m_starting_height{-1};
/** Set of txids to reconsider once their parent transactions have been accepted **/
std::set<uint256> m_orphan_work_set GUARDED_BY(g_cs_orphans);