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

@ -113,7 +113,7 @@ func run(ctx *cli.Context) {
glog.SetV(ctx.GlobalInt(VerbosityFlag.Name))
db, _ := ethdb.NewMemDatabase()
statedb := state.New(common.Hash{}, db)
statedb, _ := state.New(common.Hash{}, db)
sender := statedb.CreateAccount(common.StringToAddress("sender"))
receiver := statedb.CreateAccount(common.StringToAddress("receiver"))
receiver.SetCode(common.Hex2Bytes(ctx.GlobalString(CodeFlag.Name)))