From 6de95459a278274537ed5c1c92201eeae3c095d4 Mon Sep 17 00:00:00 2001 From: Matthew Di Ferrante Date: Thu, 29 Nov 2018 08:08:54 +0100 Subject: [PATCH] cmd/evm: commit statedb if dump is requested Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty. --- cmd/evm/runner.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 962fc021d7..a9c8a38cae 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -206,6 +206,7 @@ func runCmd(ctx *cli.Context) error { execTime := time.Since(tstart) if ctx.GlobalBool(DumpFlag.Name) { + statedb.Commit(true) statedb.IntermediateRoot(true) fmt.Println(string(statedb.Dump())) }