diff options
Diffstat (limited to 'cmd/evm/runner.go')
-rw-r--r-- | cmd/evm/runner.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 96de0c76a..a9a2e5420 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -96,7 +96,9 @@ func runCmd(ctx *cli.Context) error { } if ctx.GlobalString(GenesisFlag.Name) != "" { gen := readGenesis(ctx.GlobalString(GenesisFlag.Name)) - _, statedb = gen.ToBlock() + db, _ := ethdb.NewMemDatabase() + genesis := gen.ToBlock(db) + statedb, _ = state.New(genesis.Root(), state.NewDatabase(db)) chainConfig = gen.Config } else { db, _ := ethdb.NewMemDatabase() |