mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 07:52:25 +00:00
blockchain: initialize pow to ff..ff
as a safety to reject if it somehow does not get initialised
This commit is contained in:
parent
bf525793c7
commit
7fcd0b55ea
1 changed files with 4 additions and 2 deletions
|
@ -1694,7 +1694,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
|
// 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);
|
difficulty_type current_diff = get_next_difficulty_for_alternative_chain(alt_chain, bei);
|
||||||
CHECK_AND_ASSERT_MES(current_diff, false, "!!!!!!! DIFFICULTY OVERHEAD !!!!!!!");
|
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)
|
if (b.major_version >= RX_BLOCK_VERSION)
|
||||||
{
|
{
|
||||||
crypto::hash seedhash = null_hash;
|
crypto::hash seedhash = null_hash;
|
||||||
|
@ -3700,7 +3701,8 @@ leave:
|
||||||
|
|
||||||
TIME_MEASURE_START(longhash_calculating_time);
|
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
|
// Formerly the code below contained an if loop with the following condition
|
||||||
// !m_checkpoints.is_in_checkpoint_zone(get_current_blockchain_height())
|
// !m_checkpoints.is_in_checkpoint_zone(get_current_blockchain_height())
|
||||||
|
|
Loading…
Reference in a new issue