mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
blockchain: fix theoretical race getting bulk timestamps
This commit is contained in:
parent
e74aff06c2
commit
febb8df4bb
1 changed files with 1 additions and 0 deletions
|
@ -916,6 +916,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block()
|
|||
//------------------------------------------------------------------
|
||||
std::vector<time_t> Blockchain::get_last_block_timestamps(unsigned int blocks) const
|
||||
{
|
||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||
uint64_t height = m_db->height();
|
||||
if (blocks > height)
|
||||
blocks = height;
|
||||
|
|
Loading…
Reference in a new issue