Skip to content

Commit 3d21d45

Browse files
mattdfholiman
authored andcommitted
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.
1 parent a7501d0 commit 3d21d45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/evm/runner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ func runCmd(ctx *cli.Context) error {
206206
execTime := time.Since(tstart)
207207

208208
if ctx.GlobalBool(DumpFlag.Name) {
209+
statedb.Commit(true)
209210
statedb.IntermediateRoot(true)
210211
fmt.Println(string(statedb.Dump()))
211212
}

0 commit comments

Comments
 (0)