From 43a1a48ee2503b41e517384167283ebdc7da80cf 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 6cfe1d9c1..13f3f3232 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)