mirror of
https://github.com/monero-project/monero.git
synced 2024-12-13 11:56:31 +02:00
Merge pull request #7268
1e27f7101
blockchain: lock access to m_blocks_hash_of_hashes (moneromooo-monero)
This commit is contained in:
commit
71f7d4e71e
@ -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");
|
CHECK_AND_ASSERT_MES(weights.empty() || weights.size() == hashes.size(), 0, "Unexpected weights size");
|
||||||
|
|
||||||
|
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||||
|
|
||||||
// easy case: height >= hashes
|
// easy case: height >= hashes
|
||||||
if (height >= m_blocks_hash_of_hashes.size() * HASH_OF_HASHES_STEP)
|
if (height >= m_blocks_hash_of_hashes.size() * HASH_OF_HASHES_STEP)
|
||||||
return hashes.size();
|
return hashes.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user