Skip to content

Commit

Permalink
fix: nil pointer deref.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Mar 5, 2024
1 parent 148f358 commit 847382e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,16 @@ func ApplyUnsignedTransactionWithResult(config *params.ChainConfig, bc ChainCont

// Create a new context to be used in the EVM environment
blockContext := NewEVMBlockContext(header, bc, author)
vmenv := vm.NewEVM(blockContext, vm.TxContext{}, statedb, config, vm.Config{Tracer: tracer, NoBaseFee: true})
txContext := vm.TxContext{
Origin: msg.From,
GasPrice: msg.GasPrice,
BlobHashes: msg.BlobHashes,
BlobFeeCap: msg.BlobGasFeeCap,
}
if txContext.GasPrice == nil {
txContext.GasPrice = common.Big0
}
vmenv := vm.NewEVM(blockContext, txContext, statedb, config, vm.Config{Tracer: tracer, NoBaseFee: true})
return applyTransactionWithResult(msg, config, bc, author, gp, statedb, header, msg, usedGas, vmenv, tracer)
}

Expand Down

0 comments on commit 847382e

Please sign in to comment.