core/vm/runtime: minor fixup

This commit is contained in:
Martin Holst Swende 2024-11-01 11:30:31 +01:00
parent 08987a3da6
commit 44fa72de65
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -204,11 +204,9 @@ func Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, er
statedb = cfg.State
rules = cfg.ChainConfig.Rules(vmenv.Context.BlockNumber, vmenv.Context.Random != nil, vmenv.Context.Time)
)
if cfg.EVMConfig.Tracer != nil {
if cfg.EVMConfig.Tracer.OnTxStart != nil {
if cfg.EVMConfig.Tracer != nil && cfg.EVMConfig.Tracer.OnTxStart != nil {
cfg.EVMConfig.Tracer.OnTxStart(vmenv.GetVMContext(), types.NewTx(&types.LegacyTx{To: &address, Data: input, Value: cfg.Value, Gas: cfg.GasLimit}), cfg.Origin)
}
}
// Execute the preparatory steps for state transition which includes:
// - prepare accessList(post-berlin)
// - reset transient storage(eip 1153)