Merge pull request #3975

2d5921e blockchain: avoid duplicate db query for height (moneromooo-monero)
This commit is contained in:
luigi1111 2018-06-25 15:24:45 -05:00
commit 14372ca95a
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 1 additions and 1 deletions

View File

@ -2215,7 +2215,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;
} }