diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-10-06 22:35:55 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-10-16 08:22:06 +0800 |
commit | 1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8 (patch) | |
tree | fefd9cfe28ce5b409d58c70b03cf4a6d6dc84873 /eth/handler_test.go | |
parent | f466243417f60531998e8b500f2bb043af5b3d2a (diff) | |
download | go-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 'eth/handler_test.go')
-rw-r--r-- | eth/handler_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/handler_test.go b/eth/handler_test.go index 2b8c6168a..dde2ecbd5 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -443,10 +443,11 @@ func testGetNodeData(t *testing.T, protocol int) { } accounts := []common.Address{testBankAddress, acc1Addr, acc2Addr} for i := uint64(0); i <= pm.blockchain.CurrentBlock().NumberU64(); i++ { - trie := state.New(pm.blockchain.GetBlockByNumber(i).Root(), statedb) + trie, _ := state.New(pm.blockchain.GetBlockByNumber(i).Root(), statedb) for j, acc := range accounts { - bw := pm.blockchain.State().GetBalance(acc) + state, _ := pm.blockchain.State() + bw := state.GetBalance(acc) bh := trie.GetBalance(acc) if (bw != nil && bh == nil) || (bw == nil && bh != nil) { |