From fd5d33a33bdfefc06ded5f762bbfe1fc84ecfde4 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 30 Oct 2023 18:38:25 +0100 Subject: [PATCH] core: use NewEVMTxContext in ApplyTransaction We use this function in StateProcessor, make sure ApplyTransaction does the same. --- core/state_processor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/state_processor.go b/core/state_processor.go index 7dd81487d5..9a4333f723 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -165,7 +165,8 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo } // Create a new context to be used in the EVM environment blockContext := NewEVMBlockContext(header, bc, author) - vmenv := vm.NewEVM(blockContext, vm.TxContext{BlobHashes: tx.BlobHashes()}, statedb, config, cfg) + txContext := NewEVMTxContext(msg) + vmenv := vm.NewEVM(blockContext, txContext, statedb, config, cfg) return applyTransaction(msg, config, gp, statedb, header.Number, header.Hash(), tx, usedGas, vmenv) }