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
release-v0.9.3.3
moneromooo-monero 3 years ago committed by wowario
parent 9289bd9493
commit 22365207be
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -4819,6 +4819,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…
Cancel
Save