Skip to content

Commit

Permalink
Merge pull request #5974
Browse files Browse the repository at this point in the history
7fcd0b5 blockchain: initialize pow to ff..ff (moneromooo-monero)
  • Loading branch information
luigi1111 committed Oct 22, 2019
2 parents 3af7d16 + 7fcd0b5 commit cf2d4d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cryptonote_core/blockchain.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -3734,7 +3735,8 @@ bool Blockchain::handle_block_to_main_chain(const block& bl, const crypto::hash&

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())
Expand Down

0 comments on commit cf2d4d9

Please sign in to comment.