aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-25 15:24:45 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-25 15:24:45 -0500
commit14372ca95ae977401f4069956a816fb4232f059b (patch)
treef23129f9e9f0221be254d0938c97d7d06cc3887d /src/cryptonote_core
parentMerge pull request #3974 (diff)
parentblockchain: avoid duplicate db query for height (diff)
downloadmonero-14372ca95ae977401f4069956a816fb4232f059b.tar.xz
Merge pull request #3975
2d5921e blockchain: avoid duplicate db query for height (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index ad604deef..78f61766f 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2215,7 +2215,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;
}