aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-07-08 17:23:28 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-07-08 17:23:28 -0500
commit18bb011afea51aaa585c8ad045e341ce545a1a21 (patch)
tree67c3e4b95a98c8a1d79cb7ee5661b5c799318319 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #6627 (diff)
parentblockchain: fix total_height in getblocks.bin response (diff)
downloadmonero-18bb011afea51aaa585c8ad045e341ce545a1a21.tar.xz
Merge pull request #6629
795e186 blockchain: fix total_height in getblocks.bin response (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 2480fb4b0..ec701eb2c 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2560,6 +2560,7 @@ bool Blockchain::find_blockchain_supplement(const uint64_t req_start_block, cons
}
db_rtxn_guard rtxn_guard(m_db);
+ total_height = get_current_blockchain_height();
blocks.reserve(std::min(std::min(max_count, (size_t)10000), (size_t)(total_height - start_height)));
CHECK_AND_ASSERT_MES(m_db->get_blocks_from(start_height, 3, max_count, FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE, blocks, pruned, true, get_miner_tx_hash),
false, "Error getting blocks");