mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
blockchain: avoid duplicate db query for height
This commit is contained in:
parent
25e7a7d96f
commit
2d5921eefa
1 changed files with 1 additions and 1 deletions
|
@ -2205,7 +2205,7 @@ 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);
|
resp.cumulative_difficulty = m_db->get_block_cumulative_difficulty(resp.total_height - 1);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue