Pārlūkot izejas kodu

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.
Matthew Di Ferrante 7 gadi atpakaļ
vecāks
revīzija
3d21d455dc
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      cmd/evm/runner.go

+ 1 - 0
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()))
 	}