aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-27 06:11:54 +0800
committerobscuren <geffobscura@gmail.com>2015-05-27 07:38:41 +0800
commitb2f2806055c90f6956db6c89bfdc3df65b95d6b6 (patch)
tree6ac68bb08c8472f201d3e8e032609d5511f8c6fb /core
parent612f01400f59b0b4d0db9f9ceaa38f45805ea89e (diff)
downloaddexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar.gz
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar.bz2
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar.lz
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar.xz
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.tar.zst
dexon-b2f2806055c90f6956db6c89bfdc3df65b95d6b6.zip
cmd/geth, core: Updated DB version & seedhash debug method
Diffstat (limited to 'core')
-rw-r--r--core/block_processor.go5
1 files changed, 4 insertions, 1 deletions
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)
}