Skip to content

Commit

Permalink
Merge pull request #7268
Browse files Browse the repository at this point in the history
1e27f71 blockchain: lock access to m_blocks_hash_of_hashes (moneromooo-monero)
  • Loading branch information
Snipa22 committed Jan 4, 2021
2 parents 7264d64 + 1e27f71 commit 71f7d4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 71f7d4e

Please sign in to comment.