mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "cmd/evm: add back stateroot to jsonl-output (#27968)"
This reverts commit f28ec27bcd.
This commit is contained in:
parent
a06407068b
commit
ae10f30d23
1 changed files with 6 additions and 7 deletions
|
|
@ -107,13 +107,6 @@ func runStateTest(fname string, cfg vm.Config, jsonOut, dump bool) error {
|
|||
// Run the test and aggregate the result
|
||||
result := &StatetestResult{Name: key, Fork: st.Fork, Pass: true}
|
||||
test.Run(st, cfg, false, rawdb.HashScheme, func(err error, snaps *snapshot.Tree, state *state.StateDB) {
|
||||
if state != nil {
|
||||
root := state.IntermediateRoot(false)
|
||||
result.Root = &root
|
||||
if jsonOut {
|
||||
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%#x\"}\n", root)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
// Test failed, mark as so and dump any state to aid debugging
|
||||
result.Pass, result.Error = false, err.Error()
|
||||
|
|
@ -121,6 +114,12 @@ func runStateTest(fname string, cfg vm.Config, jsonOut, dump bool) error {
|
|||
dump := state.RawDump(nil)
|
||||
result.State = &dump
|
||||
}
|
||||
} else {
|
||||
root := state.IntermediateRoot(false)
|
||||
result.Root = &root
|
||||
if jsonOut {
|
||||
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%#x\"}\n", root)
|
||||
}
|
||||
}
|
||||
})
|
||||
results = append(results, *result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue