aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-10-06 22:35:55 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-10-16 08:22:06 +0800
commit1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8 (patch)
treefefd9cfe28ce5b409d58c70b03cf4a6d6dc84873 /core/block_processor.go
parentf466243417f60531998e8b500f2bb043af5b3d2a (diff)
downloadgo-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar.gz
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar.bz2
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar.lz
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar.xz
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.tar.zst
go-tangerine-1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8.zip
core/state, core, miner: handle missing root error from state.New
Diffstat (limited to 'core/block_processor.go')
-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 783e15687..a07d79bcf 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -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()