Skip to content

Commit

Permalink
core: remove pointless check for excessBlobGas nilness (ethereum#27797)
Browse files Browse the repository at this point in the history
* core: check excessBlobGas in front

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no need to manual panic

Signed-off-by: jsvisa <delweng@gmail.com>

* core: no comment

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
  • Loading branch information
jsvisa authored and devopsbo3 committed Nov 10, 2023
1 parent 2fa03e1 commit cd2e754
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions core/state_transition.go
Expand Up @@ -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)
Expand Down

0 comments on commit cd2e754

Please sign in to comment.