mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 09:24:47 +00:00
blockchain: lock access to m_blocks_hash_of_hashes
it is accessed both when adding and when prevalidating a set of new hashes from a peer
This commit is contained in:
parent
16c780d568
commit
1e27f7101e
1 changed files with 2 additions and 0 deletions
|
@ -4728,6 +4728,8 @@ uint64_t Blockchain::prevalidate_block_hashes(uint64_t height, const std::vector
|
|||
|
||||
CHECK_AND_ASSERT_MES(weights.empty() || weights.size() == hashes.size(), 0, "Unexpected weights size");
|
||||
|
||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||
|
||||
// easy case: height >= hashes
|
||||
if (height >= m_blocks_hash_of_hashes.size() * HASH_OF_HASHES_STEP)
|
||||
return hashes.size();
|
||||
|
|
Loading…
Reference in a new issue