forked from cerc-io/plugeth
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.
This commit is contained in:
parent
326fa00759
commit
2f4833b828
@ -108,13 +108,14 @@ func runStateTest(fname string, cfg vm.Config, jsonOut, dump bool) error {
|
|||||||
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%#x\"}\n", root)
|
fmt.Fprintf(os.Stderr, "{\"stateRoot\": \"%#x\"}\n", root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
// Dump any state to aid debugging
|
||||||
// Test failed, mark as so and dump any state to aid debugging
|
|
||||||
result.Pass, result.Error = false, err.Error()
|
|
||||||
if dump {
|
if dump {
|
||||||
dump := state.RawDump(nil)
|
dump := state.RawDump(nil)
|
||||||
result.State = &dump
|
result.State = &dump
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
// Test failed, mark as so
|
||||||
|
result.Pass, result.Error = false, err.Error()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
results = append(results, *result)
|
results = append(results, *result)
|
||||||
|
Loading…
Reference in New Issue
Block a user