Skip to content

Commit a25be32

Browse files
authored
core, eth, internal, miner: remove unnecessary parameters (#30776)
Follow-up to #30745 , this change removes some unnecessary parameters.
1 parent e3d61e6 commit a25be32

File tree

8 files changed

+61
-65
lines changed

8 files changed

+61
-65
lines changed

cmd/evm/internal/t8ntool/execution.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
203203
}
204204
evm := vm.NewEVM(vmContext, statedb, chainConfig, vmConfig)
205205
if beaconRoot := pre.Env.ParentBeaconBlockRoot; beaconRoot != nil {
206-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
206+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
207207
}
208208
if pre.Env.BlockHashes != nil && chainConfig.IsPrague(new(big.Int).SetUint64(pre.Env.Number), pre.Env.Timestamp) {
209209
var (
210210
prevNumber = pre.Env.Number - 1
211211
prevHash = pre.Env.BlockHashes[math.HexOrDecimal64(prevNumber)]
212212
)
213-
core.ProcessParentBlockHash(prevHash, evm, statedb)
213+
core.ProcessParentBlockHash(prevHash, evm)
214214
}
215215
for i := 0; txIt.Next(); i++ {
216216
tx, err := txIt.Tx()
@@ -378,9 +378,9 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
378378
requests = append(requests, depositRequests)
379379

380380
// EIP-7002 withdrawals
381-
requests = append(requests, core.ProcessWithdrawalQueue(evm, statedb))
381+
requests = append(requests, core.ProcessWithdrawalQueue(evm))
382382
// EIP-7251 consolidations
383-
requests = append(requests, core.ProcessConsolidationQueue(evm, statedb))
383+
requests = append(requests, core.ProcessConsolidationQueue(evm))
384384
}
385385

386386
// Commit block

core/chain_makers.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,8 @@ func (b *BlockGen) Difficulty() *big.Int {
9898
// block.
9999
func (b *BlockGen) SetParentBeaconRoot(root common.Hash) {
100100
b.header.ParentBeaconRoot = &root
101-
var (
102-
blockContext = NewEVMBlockContext(b.header, b.cm, &b.header.Coinbase)
103-
evm = vm.NewEVM(blockContext, b.statedb, b.cm.config, vm.Config{})
104-
)
105-
ProcessBeaconBlockRoot(root, evm, b.statedb)
101+
blockContext := NewEVMBlockContext(b.header, b.cm, &b.header.Coinbase)
102+
ProcessBeaconBlockRoot(root, vm.NewEVM(blockContext, b.statedb, b.cm.config, vm.Config{}))
106103
}
107104

108105
// addTx adds a transaction to the generated block. If no coinbase has
@@ -121,7 +118,7 @@ func (b *BlockGen) addTx(bc *BlockChain, vmConfig vm.Config, tx *types.Transacti
121118
evm = vm.NewEVM(blockContext, b.statedb, b.cm.config, vmConfig)
122119
)
123120
b.statedb.SetTxContext(tx.Hash(), len(b.txs))
124-
receipt, err := ApplyTransaction(b.cm.config, evm, b.gasPool, b.statedb, b.header, tx, &b.header.GasUsed)
121+
receipt, err := ApplyTransaction(evm, b.gasPool, b.statedb, b.header, tx, &b.header.GasUsed)
125122
if err != nil {
126123
panic(err)
127124
}
@@ -366,10 +363,10 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, engine conse
366363
blockContext := NewEVMBlockContext(b.header, cm, &b.header.Coinbase)
367364
evm := vm.NewEVM(blockContext, statedb, cm.config, vm.Config{})
368365
// EIP-7002 withdrawals
369-
withdrawalRequests := ProcessWithdrawalQueue(evm, statedb)
366+
withdrawalRequests := ProcessWithdrawalQueue(evm)
370367
requests = append(requests, withdrawalRequests)
371368
// EIP-7251 consolidations
372-
consolidationRequests := ProcessConsolidationQueue(evm, statedb)
369+
consolidationRequests := ProcessConsolidationQueue(evm)
373370
requests = append(requests, consolidationRequests)
374371
}
375372
if requests != nil {
@@ -471,7 +468,7 @@ func GenerateVerkleChain(config *params.ChainConfig, parent *types.Block, engine
471468
// EIP-2935
472469
blockContext := NewEVMBlockContext(b.header, cm, &b.header.Coinbase)
473470
evm := vm.NewEVM(blockContext, statedb, cm.config, vm.Config{})
474-
ProcessParentBlockHash(b.header.ParentHash, evm, statedb)
471+
ProcessParentBlockHash(b.header.ParentHash, evm)
475472
}
476473

477474
// Execute any user modifications to the block.

core/state_processor.go

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
8282
evm := vm.NewEVM(context, tracingStateDB, p.config, cfg)
8383

8484
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
85-
ProcessBeaconBlockRoot(*beaconRoot, evm, tracingStateDB)
85+
ProcessBeaconBlockRoot(*beaconRoot, evm)
8686
}
8787
if p.config.IsPrague(block.Number(), block.Time()) {
88-
ProcessParentBlockHash(block.ParentHash(), evm, tracingStateDB)
88+
ProcessParentBlockHash(block.ParentHash(), evm)
8989
}
9090

9191
// Iterate over and process the individual transactions
@@ -96,7 +96,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
9696
}
9797
statedb.SetTxContext(tx.Hash(), i)
9898

99-
receipt, err := ApplyTransactionWithEVM(msg, p.config, gp, statedb, blockNumber, blockHash, tx, usedGas, evm)
99+
receipt, err := ApplyTransactionWithEVM(msg, gp, statedb, blockNumber, blockHash, tx, usedGas, evm)
100100
if err != nil {
101101
return nil, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
102102
}
@@ -113,10 +113,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
113113
}
114114
requests = append(requests, depositRequests)
115115
// EIP-7002 withdrawals
116-
withdrawalRequests := ProcessWithdrawalQueue(evm, tracingStateDB)
116+
withdrawalRequests := ProcessWithdrawalQueue(evm)
117117
requests = append(requests, withdrawalRequests)
118118
// EIP-7251 consolidations
119-
consolidationRequests := ProcessConsolidationQueue(evm, tracingStateDB)
119+
consolidationRequests := ProcessConsolidationQueue(evm)
120120
requests = append(requests, consolidationRequests)
121121
}
122122

@@ -134,7 +134,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
134134
// ApplyTransactionWithEVM attempts to apply a transaction to the given state database
135135
// and uses the input parameters for its environment similar to ApplyTransaction. However,
136136
// this method takes an already created EVM instance as input.
137-
func ApplyTransactionWithEVM(msg *Message, config *params.ChainConfig, gp *GasPool, statedb *state.StateDB, blockNumber *big.Int, blockHash common.Hash, tx *types.Transaction, usedGas *uint64, evm *vm.EVM) (receipt *types.Receipt, err error) {
137+
func ApplyTransactionWithEVM(msg *Message, gp *GasPool, statedb *state.StateDB, blockNumber *big.Int, blockHash common.Hash, tx *types.Transaction, usedGas *uint64, evm *vm.EVM) (receipt *types.Receipt, err error) {
138138
if hooks := evm.Config.Tracer; hooks != nil {
139139
if hooks.OnTxStart != nil {
140140
hooks.OnTxStart(evm.GetVMContext(), tx, msg.From)
@@ -156,10 +156,10 @@ func ApplyTransactionWithEVM(msg *Message, config *params.ChainConfig, gp *GasPo
156156

157157
// Update the state with pending changes.
158158
var root []byte
159-
if config.IsByzantium(blockNumber) {
159+
if evm.ChainConfig().IsByzantium(blockNumber) {
160160
evm.StateDB.Finalise(true)
161161
} else {
162-
root = statedb.IntermediateRoot(config.IsEIP158(blockNumber)).Bytes()
162+
root = statedb.IntermediateRoot(evm.ChainConfig().IsEIP158(blockNumber)).Bytes()
163163
}
164164
*usedGas += result.UsedGas
165165

@@ -208,19 +208,19 @@ func MakeReceipt(evm *vm.EVM, result *ExecutionResult, statedb *state.StateDB, b
208208
// and uses the input parameters for its environment. It returns the receipt
209209
// for the transaction, gas used and an error if the transaction failed,
210210
// indicating the block was invalid.
211-
func ApplyTransaction(config *params.ChainConfig, evm *vm.EVM, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64) (*types.Receipt, error) {
212-
msg, err := TransactionToMessage(tx, types.MakeSigner(config, header.Number, header.Time), header.BaseFee)
211+
func ApplyTransaction(evm *vm.EVM, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64) (*types.Receipt, error) {
212+
msg, err := TransactionToMessage(tx, types.MakeSigner(evm.ChainConfig(), header.Number, header.Time), header.BaseFee)
213213
if err != nil {
214214
return nil, err
215215
}
216216
// Create a new context to be used in the EVM environment
217-
return ApplyTransactionWithEVM(msg, config, gp, statedb, header.Number, header.Hash(), tx, usedGas, evm)
217+
return ApplyTransactionWithEVM(msg, gp, statedb, header.Number, header.Hash(), tx, usedGas, evm)
218218
}
219219

220220
// ProcessBeaconBlockRoot applies the EIP-4788 system call to the beacon block root
221221
// contract. This method is exported to be used in tests.
222-
func ProcessBeaconBlockRoot(beaconRoot common.Hash, vmenv *vm.EVM, statedb vm.StateDB) {
223-
if tracer := vmenv.Config.Tracer; tracer != nil {
222+
func ProcessBeaconBlockRoot(beaconRoot common.Hash, evm *vm.EVM) {
223+
if tracer := evm.Config.Tracer; tracer != nil {
224224
if tracer.OnSystemCallStart != nil {
225225
tracer.OnSystemCallStart()
226226
}
@@ -237,16 +237,16 @@ func ProcessBeaconBlockRoot(beaconRoot common.Hash, vmenv *vm.EVM, statedb vm.St
237237
To: &params.BeaconRootsAddress,
238238
Data: beaconRoot[:],
239239
}
240-
vmenv.SetTxContext(NewEVMTxContext(msg))
241-
statedb.AddAddressToAccessList(params.BeaconRootsAddress)
242-
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
243-
statedb.Finalise(true)
240+
evm.SetTxContext(NewEVMTxContext(msg))
241+
evm.StateDB.AddAddressToAccessList(params.BeaconRootsAddress)
242+
_, _, _ = evm.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
243+
evm.StateDB.Finalise(true)
244244
}
245245

246246
// ProcessParentBlockHash stores the parent block hash in the history storage contract
247247
// as per EIP-2935.
248-
func ProcessParentBlockHash(prevHash common.Hash, vmenv *vm.EVM, statedb vm.StateDB) {
249-
if tracer := vmenv.Config.Tracer; tracer != nil {
248+
func ProcessParentBlockHash(prevHash common.Hash, evm *vm.EVM) {
249+
if tracer := evm.Config.Tracer; tracer != nil {
250250
if tracer.OnSystemCallStart != nil {
251251
tracer.OnSystemCallStart()
252252
}
@@ -263,34 +263,33 @@ func ProcessParentBlockHash(prevHash common.Hash, vmenv *vm.EVM, statedb vm.Stat
263263
To: &params.HistoryStorageAddress,
264264
Data: prevHash.Bytes(),
265265
}
266-
vmenv.SetTxContext(NewEVMTxContext(msg))
267-
statedb.AddAddressToAccessList(params.HistoryStorageAddress)
268-
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
269-
statedb.Finalise(true)
266+
evm.SetTxContext(NewEVMTxContext(msg))
267+
evm.StateDB.AddAddressToAccessList(params.HistoryStorageAddress)
268+
_, _, _ = evm.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
269+
evm.StateDB.Finalise(true)
270270
}
271271

272272
// ProcessWithdrawalQueue calls the EIP-7002 withdrawal queue contract.
273273
// It returns the opaque request data returned by the contract.
274-
func ProcessWithdrawalQueue(vmenv *vm.EVM, statedb vm.StateDB) []byte {
275-
return processRequestsSystemCall(vmenv, statedb, 0x01, params.WithdrawalQueueAddress)
274+
func ProcessWithdrawalQueue(evm *vm.EVM) []byte {
275+
return processRequestsSystemCall(evm, 0x01, params.WithdrawalQueueAddress)
276276
}
277277

278278
// ProcessConsolidationQueue calls the EIP-7251 consolidation queue contract.
279279
// It returns the opaque request data returned by the contract.
280-
func ProcessConsolidationQueue(vmenv *vm.EVM, statedb vm.StateDB) []byte {
281-
return processRequestsSystemCall(vmenv, statedb, 0x02, params.ConsolidationQueueAddress)
280+
func ProcessConsolidationQueue(evm *vm.EVM) []byte {
281+
return processRequestsSystemCall(evm, 0x02, params.ConsolidationQueueAddress)
282282
}
283283

284-
func processRequestsSystemCall(vmenv *vm.EVM, statedb vm.StateDB, requestType byte, addr common.Address) []byte {
285-
if tracer := vmenv.Config.Tracer; tracer != nil {
284+
func processRequestsSystemCall(evm *vm.EVM, requestType byte, addr common.Address) []byte {
285+
if tracer := evm.Config.Tracer; tracer != nil {
286286
if tracer.OnSystemCallStart != nil {
287287
tracer.OnSystemCallStart()
288288
}
289289
if tracer.OnSystemCallEnd != nil {
290290
defer tracer.OnSystemCallEnd()
291291
}
292292
}
293-
294293
msg := &Message{
295294
From: params.SystemAddress,
296295
GasLimit: 30_000_000,
@@ -299,10 +298,10 @@ func processRequestsSystemCall(vmenv *vm.EVM, statedb vm.StateDB, requestType by
299298
GasTipCap: common.Big0,
300299
To: &addr,
301300
}
302-
vmenv.SetTxContext(NewEVMTxContext(msg))
303-
statedb.AddAddressToAccessList(addr)
304-
ret, _, _ := vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
305-
statedb.Finalise(true)
301+
evm.SetTxContext(NewEVMTxContext(msg))
302+
evm.StateDB.AddAddressToAccessList(addr)
303+
ret, _, _ := evm.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.U2560)
304+
evm.StateDB.Finalise(true)
306305

307306
// Create withdrawals requestsData with prefix 0x01
308307
requestsData := make([]byte, len(ret)+1)

core/verkle_witness_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func TestProcessParentBlockHash(t *testing.T) {
226226
header := &types.Header{ParentHash: common.Hash{byte(i)}, Number: big.NewInt(int64(i)), Difficulty: new(big.Int)}
227227
vmContext := NewEVMBlockContext(header, nil, new(common.Address))
228228
evm := vm.NewEVM(vmContext, statedb, params.MergedTestChainConfig, vm.Config{})
229-
ProcessParentBlockHash(header.ParentHash, evm, statedb)
229+
ProcessParentBlockHash(header.ParentHash, evm)
230230
}
231231
// Read block hashes for block 0 .. num-1
232232
for i := 0; i < num; i++ {

eth/state_accessor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
238238
context := core.NewEVMBlockContext(block.Header(), eth.blockchain, nil)
239239
evm := vm.NewEVM(context, statedb, eth.blockchain.Config(), vm.Config{})
240240
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
241-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
241+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
242242
}
243243
// If prague hardfork, insert parent block hash in the state as per EIP-2935.
244244
if eth.blockchain.Config().IsPrague(block.Number(), block.Time()) {
245-
core.ProcessParentBlockHash(block.ParentHash(), evm, statedb)
245+
core.ProcessParentBlockHash(block.ParentHash(), evm)
246246
}
247247
if txIndex == 0 && len(block.Transactions()) == 0 {
248248
return nil, vm.BlockContext{}, statedb, release, nil

eth/tracers/api.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,11 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed
381381
context := core.NewEVMBlockContext(next.Header(), api.chainContext(ctx), nil)
382382
evm := vm.NewEVM(context, statedb, api.backend.ChainConfig(), vm.Config{})
383383
if beaconRoot := next.BeaconRoot(); beaconRoot != nil {
384-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
384+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
385385
}
386386
// Insert parent hash in history contract.
387387
if api.backend.ChainConfig().IsPrague(next.Number(), next.Time()) {
388-
core.ProcessParentBlockHash(next.ParentHash(), evm, statedb)
388+
core.ProcessParentBlockHash(next.ParentHash(), evm)
389389
}
390390
// Clean out any pending release functions of trace state. Note this
391391
// step must be done after constructing tracing state, because the
@@ -537,10 +537,10 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config
537537
)
538538
evm := vm.NewEVM(vmctx, statedb, chainConfig, vm.Config{})
539539
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
540-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
540+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
541541
}
542542
if chainConfig.IsPrague(block.Number(), block.Time()) {
543-
core.ProcessParentBlockHash(block.ParentHash(), evm, statedb)
543+
core.ProcessParentBlockHash(block.ParentHash(), evm)
544544
}
545545
for i, tx := range block.Transactions() {
546546
if err := ctx.Err(); err != nil {
@@ -605,10 +605,10 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
605605
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
606606
evm := vm.NewEVM(blockCtx, statedb, api.backend.ChainConfig(), vm.Config{})
607607
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
608-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
608+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
609609
}
610610
if api.backend.ChainConfig().IsPrague(block.Number(), block.Time()) {
611-
core.ProcessParentBlockHash(block.ParentHash(), evm, statedb)
611+
core.ProcessParentBlockHash(block.ParentHash(), evm)
612612
}
613613

614614
// JS tracers have high overhead. In this case run a parallel
@@ -784,10 +784,10 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block
784784
}
785785
evm := vm.NewEVM(vmctx, statedb, chainConfig, vm.Config{})
786786
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
787-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
787+
core.ProcessBeaconBlockRoot(*beaconRoot, evm)
788788
}
789789
if chainConfig.IsPrague(block.Number(), block.Time()) {
790-
core.ProcessParentBlockHash(block.ParentHash(), evm, statedb)
790+
core.ProcessParentBlockHash(block.ParentHash(), evm)
791791
}
792792
for i, tx := range block.Transactions() {
793793
// Prepare the transaction for un-traced execution
@@ -1037,7 +1037,7 @@ func (api *API) traceTx(ctx context.Context, tx *types.Transaction, message *cor
10371037

10381038
// Call Prepare to clear out the statedb access list
10391039
statedb.SetTxContext(txctx.TxHash, txctx.TxIndex)
1040-
_, err = core.ApplyTransactionWithEVM(message, api.backend.ChainConfig(), new(core.GasPool).AddGas(message.GasLimit), statedb, vmctx.BlockNumber, txctx.BlockHash, tx, &usedGas, evm)
1040+
_, err = core.ApplyTransactionWithEVM(message, new(core.GasPool).AddGas(message.GasLimit), statedb, vmctx.BlockNumber, txctx.BlockHash, tx, &usedGas, evm)
10411041
if err != nil {
10421042
return nil, fmt.Errorf("tracing failed: %w", err)
10431043
}

internal/ethapi/simulate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func repairLogs(calls []simCallResult, hash common.Hash) {
265265
}
266266
}
267267

268-
func (sim *simulator) sanitizeCall(call *TransactionArgs, state *state.StateDB, header *types.Header, blockContext vm.BlockContext, gasUsed *uint64) error {
268+
func (sim *simulator) sanitizeCall(call *TransactionArgs, state vm.StateDB, header *types.Header, blockContext vm.BlockContext, gasUsed *uint64) error {
269269
if call.Nonce == nil {
270270
nonce := state.GetNonce(call.from())
271271
call.Nonce = (*hexutil.Uint64)(&nonce)

miner/worker.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ func (miner *Miner) generateWork(params *generateParams, witness bool) *newPaylo
128128
}
129129
requests = append(requests, depositRequests)
130130
// EIP-7002 withdrawals
131-
withdrawalRequests := core.ProcessWithdrawalQueue(work.evm, work.state)
131+
withdrawalRequests := core.ProcessWithdrawalQueue(work.evm)
132132
requests = append(requests, withdrawalRequests)
133133
// EIP-7251 consolidations
134-
consolidationRequests := core.ProcessConsolidationQueue(work.evm, work.state)
134+
consolidationRequests := core.ProcessConsolidationQueue(work.evm)
135135
requests = append(requests, consolidationRequests)
136136
}
137137
if requests != nil {
@@ -231,10 +231,10 @@ func (miner *Miner) prepareWork(genParams *generateParams, witness bool) (*envir
231231
return nil, err
232232
}
233233
if header.ParentBeaconRoot != nil {
234-
core.ProcessBeaconBlockRoot(*header.ParentBeaconRoot, env.evm, env.state)
234+
core.ProcessBeaconBlockRoot(*header.ParentBeaconRoot, env.evm)
235235
}
236236
if miner.chainConfig.IsPrague(header.Number, header.Time) {
237-
core.ProcessParentBlockHash(header.ParentHash, env.evm, env.state)
237+
core.ProcessParentBlockHash(header.ParentHash, env.evm)
238238
}
239239
return env, nil
240240
}
@@ -309,7 +309,7 @@ func (miner *Miner) applyTransaction(env *environment, tx *types.Transaction) (*
309309
snap = env.state.Snapshot()
310310
gp = env.gasPool.Gas()
311311
)
312-
receipt, err := core.ApplyTransaction(miner.chainConfig, env.evm, env.gasPool, env.state, env.header, tx, &env.header.GasUsed)
312+
receipt, err := core.ApplyTransaction(env.evm, env.gasPool, env.state, env.header, tx, &env.header.GasUsed)
313313
if err != nil {
314314
env.state.RevertToSnapshot(snap)
315315
env.gasPool.SetGas(gp)

0 commit comments

Comments
 (0)