aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-06-05 15:26:39 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-06-05 15:27:07 +0000
commit795e18632c0bbc0557393d321fe016f09861c309 (patch)
treef7a0d4bce8a7039538535d688ff5879aa3febf09 /src/cryptonote_core
parentMerge pull request #6612 (diff)
downloadmonero-795e18632c0bbc0557393d321fe016f09861c309.tar.xz
blockchain: fix total_height in getblocks.bin response
Diffstat (limited to 'src/cryptonote_core')
-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 2571e4203..dda378202 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2493,6 +2493,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");