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
pull/29372/head
Martin HS 8 months ago committed by GitHub
parent f2a6ac17b2
commit 1dd898c24e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      tests/state_test_util.go

@ -295,6 +295,14 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
}
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.
snapshot := st.StateDB.Snapshot()
gaspool := new(core.GasPool)

Loading…
Cancel
Save