mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
blockchain: use uint64_t for height, not size_t
This commit is contained in:
parent
0dddfeacc9
commit
83f5587167
@ -2294,7 +2294,7 @@ bool Blockchain::find_blockchain_supplement(const uint64_t req_start_block, cons
|
|||||||
total_height = get_current_blockchain_height();
|
total_height = get_current_blockchain_height();
|
||||||
size_t count = 0, size = 0;
|
size_t count = 0, size = 0;
|
||||||
blocks.reserve(std::min(std::min(max_count, (size_t)10000), (size_t)(total_height - start_height)));
|
blocks.reserve(std::min(std::min(max_count, (size_t)10000), (size_t)(total_height - start_height)));
|
||||||
for(size_t i = start_height; i < total_height && count < max_count && (size < FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE || count < 3); i++, count++)
|
for(uint64_t i = start_height; i < total_height && count < max_count && (size < FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE || count < 3); i++, count++)
|
||||||
{
|
{
|
||||||
blocks.resize(blocks.size()+1);
|
blocks.resize(blocks.size()+1);
|
||||||
blocks.back().first.first = m_db->get_block_blob_from_height(i);
|
blocks.back().first.first = m_db->get_block_blob_from_height(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user