From b2f2806055c90f6956db6c89bfdc3df65b95d6b6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 27 May 2015 00:11:54 +0200 Subject: cmd/geth, core: Updated DB version & seedhash debug method --- core/block_processor.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/block_processor.go b/core/block_processor.go index 3f10e5efd..037782407 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -21,7 +21,7 @@ import ( const ( // must be bumped when consensus algorithm is changed, this forces the upgradedb // command to be run (forces the blocks to be imported again using the new algorithm) - BlockChainVersion = 2 + BlockChainVersion = 3 ) var receiptsPre = []byte("receipts-") @@ -159,6 +159,9 @@ func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs state.Logs, err return nil, ParentError(header.ParentHash) } parent := sm.bc.GetBlock(header.ParentHash) + if !sm.Pow.Verify(block) { + return nil, ValidationError("Block's nonce is invalid (= %x)", block.Nonce) + } return sm.processWithParent(block, parent) } -- cgit v1.2.3