Skip to content

Commit

Permalink
Prevent getting invalid block data in blockchain
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonf committed Nov 24, 2018
1 parent 2cfa6ac commit fb64790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cryptonote_core/blockchain.cpp
Expand Up @@ -2186,7 +2186,8 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc
CRITICAL_REGION_LOCAL(m_blockchain_lock); CRITICAL_REGION_LOCAL(m_blockchain_lock);


bool result = find_blockchain_supplement(qblock_ids, resp.m_block_ids, resp.start_height, resp.total_height); bool result = find_blockchain_supplement(qblock_ids, resp.m_block_ids, resp.start_height, resp.total_height);
resp.cumulative_difficulty = m_db->get_block_cumulative_difficulty(m_db->height() - 1); if (result)
resp.cumulative_difficulty = m_db->get_block_cumulative_difficulty(m_db->height() - 1);


return result; return result;
} }
Expand Down

0 comments on commit fb64790

Please sign in to comment.