diff --git a/core/block_validator.go b/core/block_validator.go index 4c68505d12..57e588b53d 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -82,9 +82,12 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error { } // Blob transactions may be present after the Cancun fork. - var blobs int + var ( + blobs int + isOsaka = v.config.IsOsaka(block.Number(), block.Time()) + ) for i, tx := range block.Transactions() { - if v.config.IsOsaka(block.Number(), block.Time()) && tx.Gas() > params.MaxTxGas { + if isOsaka && tx.Gas() > params.MaxTxGas { return fmt.Errorf("%w (cap: %d, tx: %d)", ErrGasLimitTooHigh, params.MaxTxGas, tx.Gas()) } diff --git a/miner/worker.go b/miner/worker.go index 9e9f9270b0..ac0f507514 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -448,7 +448,6 @@ func (miner *Miner) fillTransactions(interrupt *atomic.Int32, env *environment) filter.GasLimitCap = params.MaxTxGas } filter.OnlyPlainTxs, filter.OnlyBlobTxs = true, false - pendingPlainTxs := miner.txpool.Pending(filter) filter.OnlyPlainTxs, filter.OnlyBlobTxs = false, true