aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Di Ferrante <mattdf@users.noreply.github.com>2018-11-29 16:29:12 +0800
committerMartin Holst Swende <martin@swende.se>2018-11-29 16:29:12 +0800
commit3d21d455dca6e75a635ab5742c66c80ee175c3e7 (patch)
treef51d379bab40c376358be877a118e9bf84ae6d45 /cmd
parenta7501d0c419f8c1dc8b4004c115dd2d4e3b524b7 (diff)
downloaddexon-3d21d455dca6e75a635ab5742c66c80ee175c3e7.tar.gz
dexon-3d21d455dca6e75a635ab5742c66c80ee175c3e7.tar.zst
dexon-3d21d455dca6e75a635ab5742c66c80ee175c3e7.zip
cmd/evm: commit statedb if dump is requested (#18208)
Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/evm/runner.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index 962fc021d..a9c8a38ca 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()))
}