aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-22 10:13:34 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-22 10:13:34 -0500
commitcf2d4d9a16e382146e59413aefd38699d5c56322 (patch)
treeddfaa539bf51522ae8e6522060a83434f8394175
parentMerge pull request #5971 (diff)
parentblockchain: initialize pow to ff..ff (diff)
downloadmonero-cf2d4d9a16e382146e59413aefd38699d5c56322.tar.xz
Merge pull request #5974
7fcd0b5 blockchain: initialize pow to ff..ff (moneromooo-monero)
-rw-r--r--src/cryptonote_core/blockchain.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 9f4e91532..b7e9f4ca2 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1703,7 +1703,8 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id
// Check the block's hash against the difficulty target for its alt chain
difficulty_type current_diff = get_next_difficulty_for_alternative_chain(alt_chain, bei);
CHECK_AND_ASSERT_MES(current_diff, false, "!!!!!!! DIFFICULTY OVERHEAD !!!!!!!");
- crypto::hash proof_of_work = null_hash;
+ crypto::hash proof_of_work;
+ memset(proof_of_work.data, 0xff, sizeof(proof_of_work.data));
if (b.major_version >= RX_BLOCK_VERSION)
{
crypto::hash seedhash = null_hash;
@@ -3734,7 +3735,8 @@ leave:
TIME_MEASURE_START(longhash_calculating_time);
- crypto::hash proof_of_work = null_hash;
+ crypto::hash proof_of_work;
+ memset(proof_of_work.data, 0xff, sizeof(proof_of_work.data));
// Formerly the code below contained an if loop with the following condition
// !m_checkpoints.is_in_checkpoint_zone(get_current_blockchain_height())