miner: fix 4844 max check

This commit is contained in:
lightclient 2023-08-29 14:05:42 -07:00
parent b8adb4cb0c
commit d716c1c45f
No known key found for this signature in database
GPG key ID: 75C916AFEE20183E

View file

@ -761,7 +761,7 @@ func (w *worker) commitBlobTransaction(env *environment, tx *types.Transaction)
// isn't really a better place right now. The blob gas limit is checked at block validation time
// and not during execution. This means core.ApplyTransaction will not return an error if the
// tx has too many blobs. So we have to explicitly check it here.
if (env.blobs+len(sc.Blobs))*params.BlobTxBlobGasPerBlob > params.MaxBlobGasPerBlock {
if (env.blobs + len(sc.Blobs)) > params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob {
return nil, errors.New("max data blobs reached")
}