Remove unecessary check in pipe.rs (#1763)

This commit is contained in:
Quentin Le Sceller 2018-10-16 15:04:00 -04:00 committed by Ignotus Peverell
parent 119b5cfc46
commit 701f0b9b60

View file

@ -28,7 +28,7 @@ use core::core::verifier_cache::VerifierCache;
use core::core::Committed; use core::core::Committed;
use core::core::{Block, BlockHeader, BlockSums}; use core::core::{Block, BlockHeader, BlockSums};
use core::global; use core::global;
use core::pow::{self, Difficulty}; use core::pow;
use error::{Error, ErrorKind}; use error::{Error, ErrorKind};
use grin_store; use grin_store;
use store; use store;
@ -424,12 +424,6 @@ fn validate_header(header: &BlockHeader, ctx: &mut BlockContext) -> Result<(), E
return Err(ErrorKind::DifficultyTooLow.into()); return Err(ErrorKind::DifficultyTooLow.into());
} }
// explicit check to ensure we are not below the minimum difficulty
// we will also check difficulty based on next_difficulty later on
if target_difficulty < Difficulty::one() {
return Err(ErrorKind::DifficultyTooLow.into());
}
// explicit check to ensure total_difficulty has increased by exactly // explicit check to ensure total_difficulty has increased by exactly
// the _network_ difficulty of the previous block // the _network_ difficulty of the previous block
// (during testnet1 we use _block_ difficulty here) // (during testnet1 we use _block_ difficulty here)