mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 20:36:31 +02:00
blockchain: pass correct height to get_block_longhash
This commit is contained in:
parent
ab594cfee9
commit
ff4bcaed81
@ -3541,19 +3541,17 @@ void Blockchain::set_enforce_dns_checkpoints(bool enforce_checkpoints)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void Blockchain::block_longhash_worker(const uint64_t height, const std::vector<block> &blocks, std::unordered_map<crypto::hash, crypto::hash> &map) const
|
void Blockchain::block_longhash_worker(uint64_t height, const std::vector<block> &blocks, std::unordered_map<crypto::hash, crypto::hash> &map) const
|
||||||
{
|
{
|
||||||
TIME_MEASURE_START(t);
|
TIME_MEASURE_START(t);
|
||||||
slow_hash_allocate_state();
|
slow_hash_allocate_state();
|
||||||
|
|
||||||
//FIXME: height should be changing here, as get_block_longhash expects
|
|
||||||
// the height of the block passed to it
|
|
||||||
for (const auto & block : blocks)
|
for (const auto & block : blocks)
|
||||||
{
|
{
|
||||||
if (m_cancel)
|
if (m_cancel)
|
||||||
return;
|
return;
|
||||||
crypto::hash id = get_block_hash(block);
|
crypto::hash id = get_block_hash(block);
|
||||||
crypto::hash pow = get_block_longhash(block, height);
|
crypto::hash pow = get_block_longhash(block, height++);
|
||||||
map.emplace(id, pow);
|
map.emplace(id, pow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user