From f3ede7679dacf51ab552f66d455cff41aabe6f9f Mon Sep 17 00:00:00 2001 From: Delweng Date: Mon, 31 Jul 2023 15:54:26 +0800 Subject: [PATCH] core: remove pointless check for excessBlobGas nilness (#27797) * core: check excessBlobGas in front Signed-off-by: jsvisa * core: no need to manual panic Signed-off-by: jsvisa * core: no comment Signed-off-by: jsvisa --------- Signed-off-by: jsvisa --- core/state_transition.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index da8411ef78cc4..3ad5930e598de 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -242,10 +242,6 @@ 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)