mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
tests: print EVM output and error to test log
This commit is contained in:
parent
fc2c730a51
commit
ec33a515cd
1 changed files with 3 additions and 2 deletions
|
|
@ -68,8 +68,7 @@ func TestState(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
||||||
//const traceErrorLimit = 400000
|
const traceErrorLimit = 400000
|
||||||
const traceErrorLimit = 0
|
|
||||||
|
|
||||||
func withTrace(t *testing.T, gasLimit uint64, test func(vm.Config) error) {
|
func withTrace(t *testing.T, gasLimit uint64, test func(vm.Config) error) {
|
||||||
err := test(vm.Config{})
|
err := test(vm.Config{})
|
||||||
|
|
@ -93,4 +92,6 @@ func withTrace(t *testing.T, gasLimit uint64, test func(vm.Config) error) {
|
||||||
} else {
|
} else {
|
||||||
t.Log("EVM operation log:\n" + buf.String())
|
t.Log("EVM operation log:\n" + buf.String())
|
||||||
}
|
}
|
||||||
|
t.Logf("EVM output: 0x%x", tracer.Output())
|
||||||
|
t.Logf("EVM error: %v", tracer.Error())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue