mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/evm/internal/t8ntool: add missing blobgas max-check
This commit is contained in:
parent
ad59821761
commit
3fdff6e5d3
1 changed files with 8 additions and 1 deletions
|
|
@ -205,7 +205,14 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
|
|||
continue
|
||||
}
|
||||
if tx.Type() == types.BlobTxType {
|
||||
blobGasUsed += uint64(params.BlobTxBlobGasPerBlob * len(tx.BlobHashes()))
|
||||
txBlobGas := uint64(params.BlobTxBlobGasPerBlob * len(tx.BlobHashes()))
|
||||
if blobGasUsed+txBlobGas > params.BlobTxBlobGasPerBlob {
|
||||
err := fmt.Errorf("blob gas (%d) would exceed maximum allowance %d", blobGasUsed+txBlobGas, params.MaxBlobGasPerBlock)
|
||||
log.Warn("rejected tx", "index", i, "err", err)
|
||||
rejectedTxs = append(rejectedTxs, &rejectedTx{i, err.Error()})
|
||||
continue
|
||||
}
|
||||
blobGasUsed += txBlobGas
|
||||
}
|
||||
msg, err := core.TransactionToMessage(tx, signer, pre.Env.BaseFee)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue