From 61cb33e0b45e439c9c119450f78beeee6678d0eb Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:31:54 -0600 Subject: [PATCH] Revert "core: remove pointless check for excessBlobGas nilness (#27797)" This reverts commit cd2e754633d7f628d48e676f87c1b022102bb03f. --- core/state_transition.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/state_transition.go b/core/state_transition.go index 13f3f32321c9e..6cfe1d9c1a06d 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -242,6 +242,10 @@ func (st *StateTransition) buyGas() error { } if st.evm.ChainConfig().IsCancun(st.evm.Context.BlockNumber, st.evm.Context.Time) { if blobGas := st.blobGasUsed(); blobGas > 0 { + if st.evm.Context.ExcessBlobGas == nil { + // programming error + panic("missing field excess data gas") + } // Check that the user has enough funds to cover blobGasUsed * tx.BlobGasFeeCap blobBalanceCheck := new(big.Int).SetUint64(blobGas) blobBalanceCheck.Mul(blobBalanceCheck, st.msg.BlobGasFeeCap)