Permalink
Browse files

Prevent getting invalid block data in blockchain

  • Loading branch information...
miltonf committed Nov 24, 2018
1 parent 2cfa6ac commit fb64790f43c948cb9c3722f0fe379c3d8e1222f6
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/cryptonote_core/blockchain.cpp
@@ -2186,7 +2186,8 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc
CRITICAL_REGION_LOCAL(m_blockchain_lock);

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;
}

0 comments on commit fb64790

Please sign in to comment.