aboutsummaryrefslogtreecommitdiff
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-11 12:51:06 +0000
commitb7812d1674b9a2c5df4bd4c98f18de340098a3c4 (patch)
tree6f7483e42c6ff6d0ce08f0b7ffb94d1c698a900d
parentMerge pull request #6579 (diff)
downloadmonero-b7812d1674b9a2c5df4bd4c98f18de340098a3c4.tar.xz
blockchain: fix total_height in getblocks.bin response
-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");