good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit cf448036 authored by Groute's avatar Groute Committed by GitHub
Browse files

state_processor: fix ignored SkipAnalysis() result (#4046)

`cfg` is not a pointer
parent e758fb80
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,10 @@ func applyTransaction(config *params.ChainConfig, gp *GasPool, statedb *state.In ...@@ -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) { 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 // 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 var vmenv vm.VMInterface
if tx.IsStarkNet() { if tx.IsStarkNet() {
...@@ -152,9 +156,5 @@ func ApplyTransaction(config *params.ChainConfig, getHeader func(hash common.Has ...@@ -152,9 +156,5 @@ func ApplyTransaction(config *params.ChainConfig, getHeader func(hash common.Has
vmenv = vm.NewEVM(blockContext, vm.TxContext{}, ibs, config, cfg) 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) return applyTransaction(config, gp, ibs, stateWriter, header, tx, usedGas, vmenv, cfg)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment