aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-10-16 21:18:41 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-10-16 21:18:41 +0800
commitb74775400906cc582bdbb98bf5067c5258ee491f (patch)
treefefd9cfe28ce5b409d58c70b03cf4a6d6dc84873 /rpc
parentf466243417f60531998e8b500f2bb043af5b3d2a (diff)
parent1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8 (diff)
downloaddexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar.gz
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar.bz2
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar.lz
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar.xz
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.tar.zst
dexon-b74775400906cc582bdbb98bf5067c5258ee491f.zip
Merge pull request #1881 from Gustav-Simonsson/state_new_error
core/state, core, miner: handle missing root error from state.New
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api/debug.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc/api/debug.go b/rpc/api/debug.go
index e193f7ad2..003b4d994 100644
--- a/rpc/api/debug.go
+++ b/rpc/api/debug.go
@@ -119,9 +119,9 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) {
return nil, fmt.Errorf("block #%d not found", args.BlockNumber)
}
- stateDb := state.New(block.Root(), self.ethereum.ChainDb())
- if stateDb == nil {
- return nil, nil
+ stateDb, err := state.New(block.Root(), self.ethereum.ChainDb())
+ if err != nil {
+ return nil, err
}
return stateDb.RawDump(), nil