aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-07-27 18:18:20 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-07-27 18:18:20 +0100
commitff4bcaed81017cccb589cd392d47ca83d6a392bf (patch)
treeaf9a06d207ff058e71d3b8fe82340ae12d188c6a /src
parentMerge pull request #2159 (diff)
downloadmonero-ff4bcaed81017cccb589cd392d47ca83d6a392bf.tar.xz
blockchain: pass correct height to get_block_longhash
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 745608b9f..742e1ac3d 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -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);
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)
{
if (m_cancel)
return;
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);
}