Skip to content

Commit

Permalink
optimism: user can set pending block gas limit (ethereum#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda authored Dec 16, 2022
1 parent 0678a13 commit 60b51d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,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 {
Expand Down

0 comments on commit 60b51d6

Please sign in to comment.