core/state, core, miner: handle missing root error from state.New

This commit is contained in:
Gustav Simonsson
2015-10-06 16:35:55 +02:00
parent f466243417
commit 1b1f293082
23 changed files with 182 additions and 95 deletions

View File

@@ -207,7 +207,10 @@ func (sm *BlockProcessor) Process(block *types.Block) (logs vm.Logs, receipts ty
func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs vm.Logs, receipts types.Receipts, err error) {
// Create a new state based on the parent's root (e.g., create copy)
state := state.New(parent.Root(), sm.chainDb)
state, err := state.New(parent.Root(), sm.chainDb)
if err != nil {
return nil, nil, err
}
header := block.Header()
uncles := block.Uncles()
txs := block.Transactions()