Skip to content

Commit 2f4833b

Browse files
authored
cmd/evm: allow state dump regardless if test passes in statetest (#28484)
This change makes it so that when executing state tess, state is always dumped out if the corresponding flag is set.
1 parent 326fa00 commit 2f4833b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmd/evm/staterunner.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,14 @@ func runStateTest(fname string, cfg vm.Config, jsonOut, dump bool) error {
108108
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%#x\"}\n", root)
109109
}
110110
}
111+
// Dump any state to aid debugging
112+
if dump {
113+
dump := state.RawDump(nil)
114+
result.State = &dump
115+
}
111116
if err != nil {
112-
// Test failed, mark as so and dump any state to aid debugging
117+
// Test failed, mark as so
113118
result.Pass, result.Error = false, err.Error()
114-
if dump {
115-
dump := state.RawDump(nil)
116-
result.State = &dump
117-
}
118119
}
119120
})
120121
results = append(results, *result)

0 commit comments

Comments
 (0)