mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
core, miner: add isOsaka field
This commit is contained in:
parent
e2420abbc3
commit
ccf302067e
2 changed files with 5 additions and 3 deletions
|
|
@ -82,9 +82,12 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blob transactions may be present after the Cancun fork.
|
// 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() {
|
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())
|
return fmt.Errorf("%w (cap: %d, tx: %d)", ErrGasLimitTooHigh, params.MaxTxGas, tx.Gas())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -448,7 +448,6 @@ func (miner *Miner) fillTransactions(interrupt *atomic.Int32, env *environment)
|
||||||
filter.GasLimitCap = params.MaxTxGas
|
filter.GasLimitCap = params.MaxTxGas
|
||||||
}
|
}
|
||||||
filter.OnlyPlainTxs, filter.OnlyBlobTxs = true, false
|
filter.OnlyPlainTxs, filter.OnlyBlobTxs = true, false
|
||||||
|
|
||||||
pendingPlainTxs := miner.txpool.Pending(filter)
|
pendingPlainTxs := miner.txpool.Pending(filter)
|
||||||
|
|
||||||
filter.OnlyPlainTxs, filter.OnlyBlobTxs = false, true
|
filter.OnlyPlainTxs, filter.OnlyBlobTxs = false, true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue