aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/block_processor.go')
-rw-r--r--core/block_processor.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index 893c586dd..b4449100f 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -250,7 +250,11 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error {
}
if block.Time() > time.Now().Unix() {
- return fmt.Errorf("block time is in the future")
+ return BlockFutureErr
+ }
+
+ if new(big.Int).Sub(block.Number(), parent.Number()).Cmp(big.NewInt(1)) != 0 {
+ return BlockNumberErr
}
// Verify the nonce of the block. Return an error if it's not valid