Skip to content

Commit

Permalink
state_processor: fix ignored SkipAnalysis() result (#4046)
Browse files Browse the repository at this point in the history
`cfg` is not a pointer
  • Loading branch information
iAmGroute authored May 2, 2022
1 parent e758fb8 commit cf44803
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
}

0 comments on commit cf44803

Please sign in to comment.