diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-27 07:47:10 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-27 07:47:10 +0800 |
commit | 3590591e674b14fd025aac91952d9408bb841527 (patch) | |
tree | 7dccb0359577de4b4daa0470c13e44a68b0859d5 /core | |
parent | 612f01400f59b0b4d0db9f9ceaa38f45805ea89e (diff) | |
parent | 222249e622cd552b0500051fbbcbfb00a5366da4 (diff) | |
download | dexon-3590591e674b14fd025aac91952d9408bb841527.tar dexon-3590591e674b14fd025aac91952d9408bb841527.tar.gz dexon-3590591e674b14fd025aac91952d9408bb841527.tar.bz2 dexon-3590591e674b14fd025aac91952d9408bb841527.tar.lz dexon-3590591e674b14fd025aac91952d9408bb841527.tar.xz dexon-3590591e674b14fd025aac91952d9408bb841527.tar.zst dexon-3590591e674b14fd025aac91952d9408bb841527.zip |
Merge pull request #1113 from obscuren/develop
core: block database version update
Diffstat (limited to 'core')
-rw-r--r-- | core/block_processor.go | 5 |
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) } |