prevent deadlock

This commit is contained in:
obscuren
2015-04-04 18:23:51 +02:00
parent f9488cb763
commit 7a18a39351
3 changed files with 12 additions and 17 deletions

View File

@ -268,15 +268,15 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header) error {
return BlockNumberErr
}
if block.Time <= parent.Time {
return BlockEqualTSErr //ValidationError("Block timestamp equal or less than previous block (%v - %v)", block.Time, parent.Time)
}
// Verify the nonce of the block. Return an error if it's not valid
if !sm.Pow.Verify(types.NewBlockWithHeader(block)) {
return ValidationError("Block's nonce is invalid (= %x)", block.Nonce)
}
if block.Time <= parent.Time {
return BlockEqualTSErr //ValidationError("Block timestamp equal or less than previous block (%v - %v)", block.Time, parent.Time)
}
return nil
}