From 1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 6 Oct 2015 16:35:55 +0200 Subject: core/state, core, miner: handle missing root error from state.New --- rpc/api/debug.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rpc') 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 -- cgit