fix: use DIFFICULTY_ADJUSTMENT_INTERVAL consistently
@@ -1231,7 +1231,8 @@ impl<T: Config> Pallet<T> {
return Ok(basic_block_header);
}
- let expected_target = if block_height >= 2016 && block_height % DIFFICULTY_ADJUSTMENT_INTERVAL == 0 {
+ let expected_target =
+ if block_height >= DIFFICULTY_ADJUSTMENT_INTERVAL && block_height % DIFFICULTY_ADJUSTMENT_INTERVAL == 0 {
Self::compute_new_target(&prev_block_header, block_height)?
} else {
prev_block_header.block_header.target
