blockchain: avoid duplicate db query for height

This commit is contained in:
moneromooo-monero 2018-06-09 19:49:58 +01:00 committed by wowario
parent d11f4fb80d
commit 1959297a1e
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

View File

@ -2200,7 +2200,7 @@ 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);
resp.cumulative_difficulty = m_db->get_block_cumulative_difficulty(resp.total_height - 1);
return result;
}