From cf448036212b4a752f13e77a9c58732cfc2eebd5 Mon Sep 17 00:00:00 2001 From: Groute Date: Mon, 2 May 2022 20:56:49 +0300 Subject: [PATCH] state_processor: fix ignored SkipAnalysis() result (#4046) `cfg` is not a pointer --- core/state_processor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/state_processor.go b/core/state_processor.go index 0667b8dba26..044f121edc4 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -143,6 +143,10 @@ func applyTransaction(config *params.ChainConfig, gp *GasPool, statedb *state.In func ApplyTransaction(config *params.ChainConfig, getHeader func(hash common.Hash, number uint64) *types.Header, engine consensus.Engine, author *common.Address, gp *GasPool, ibs *state.IntraBlockState, stateWriter state.StateWriter, header *types.Header, tx types.Transaction, usedGas *uint64, cfg vm.Config, contractHasTEVM func(contractHash common.Hash) (bool, error)) (*types.Receipt, []byte, error) { // Create a new context to be used in the EVM environment + // Add addresses to access list if applicable + // about the transaction and calling mechanisms. + cfg.SkipAnalysis = SkipAnalysis(config, header.Number.Uint64()) + var vmenv vm.VMInterface if tx.IsStarkNet() { @@ -152,9 +156,5 @@ func ApplyTransaction(config *params.ChainConfig, getHeader func(hash common.Has vmenv = vm.NewEVM(blockContext, vm.TxContext{}, ibs, config, cfg) } - // Add addresses to access list if applicable - // about the transaction and calling mechanisms. - cfg.SkipAnalysis = SkipAnalysis(config, header.Number.Uint64()) - return applyTransaction(config, gp, ibs, stateWriter, header, tx, usedGas, vmenv, cfg) }