1
0
Fork 0
forked from lthn/blockchain

removed PoS from diffictulty func on develop branch

This commit is contained in:
cryptozoidberg 2019-05-18 16:13:10 +02:00
parent 4b3cad52d2
commit 7b544f059b
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC

View file

@ -919,7 +919,7 @@ wide_difficulty_type blockchain_storage::get_next_diff_conditional(bool pos) con
wide_difficulty_type& dif = pos ? m_cached_next_pos_difficulty : m_cached_next_pow_difficulty;
TIME_MEASURE_FINISH_PD(target_calculating_enum_blocks);
TIME_MEASURE_START_PD(target_calculating_calc);
dif = next_difficulty(timestamps, commulative_difficulties, pos ? DIFFICULTY_POS_TARGET : DIFFICULTY_POW_TARGET, pos);
dif = next_difficulty(timestamps, commulative_difficulties, pos ? DIFFICULTY_POS_TARGET : DIFFICULTY_POW_TARGET);
TIME_MEASURE_FINISH_PD(target_calculating_calc);
return dif;
}
@ -947,7 +947,7 @@ wide_difficulty_type blockchain_storage::get_next_diff_conditional2(bool pos, co
return true;
};
enum_blockchain(cb, alt_chain, split_height);
return next_difficulty(timestamps, commulative_difficulties, pos ? DIFFICULTY_POS_TARGET : DIFFICULTY_POW_TARGET, pos);
return next_difficulty(timestamps, commulative_difficulties, pos ? DIFFICULTY_POS_TARGET : DIFFICULTY_POW_TARGET);
}
//------------------------------------------------------------------
wide_difficulty_type blockchain_storage::get_cached_next_difficulty(bool pos) const