mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-30 21:32:55 +00:00
tests: fix panic via state test runner using json logger (#29349)
* tests: fix panic via state test runner using json logger * tests: also invoke OnTxEnd
This commit is contained in:
parent
f2a6ac17b2
commit
1dd898c24e
1 changed files with 8 additions and 0 deletions
|
|
@ -295,6 +295,14 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
|
||||||
}
|
}
|
||||||
evm := vm.NewEVM(context, txContext, st.StateDB, config, vmconfig)
|
evm := vm.NewEVM(context, txContext, st.StateDB, config, vmconfig)
|
||||||
|
|
||||||
|
if tracer := vmconfig.Tracer; tracer != nil && tracer.OnTxStart != nil {
|
||||||
|
tracer.OnTxStart(evm.GetVMContext(), nil, msg.From)
|
||||||
|
if evm.Config.Tracer.OnTxEnd != nil {
|
||||||
|
defer func() {
|
||||||
|
evm.Config.Tracer.OnTxEnd(nil, err)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
}
|
||||||
// Execute the message.
|
// Execute the message.
|
||||||
snapshot := st.StateDB.Snapshot()
|
snapshot := st.StateDB.Snapshot()
|
||||||
gaspool := new(core.GasPool)
|
gaspool := new(core.GasPool)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue