diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-09 19:49:58 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-09 19:51:27 +0100 |
commit | 2d5921eefa150c502f3e1ff5917e3e439458d6de (patch) | |
tree | b9dc4a26d68b0df52fdc0df2d2a59c7a5ba3ddb5 | |
parent | Merge pull request #3340 (diff) | |
download | monero-2d5921eefa150c502f3e1ff5917e3e439458d6de.tar.xz |
blockchain: avoid duplicate db query for height
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index fbb2a2223..76a26a8f4 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2205,7 +2205,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; } |