optimism: user can set pending block gas limit (#24)

This commit is contained in:
protolambda 2022-12-16 20:06:03 +01:00
parent ac785740c5
commit ffcd75be7d
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 3 additions and 0 deletions

View File

@ -1040,6 +1040,9 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
}
if genParams.gasLimit != nil { // override gas limit if specified
header.GasLimit = *genParams.gasLimit
} else if w.chain.Config().Optimism != nil && w.config.GasCeil != 0 {
// configure the gas limit of pending blocks with the miner gas limit config when using optimism
header.GasLimit = w.config.GasCeil
}
// Run the consensus preparation with the default or customized consensus engine.
if err := w.engine.Prepare(w.chain, header); err != nil {