Skip to content

Commit

Permalink
optimism: user can set pending block gas limit (bnb-chain#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Feb 22, 2023
1 parent ac78574 commit ffcd75b
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 @@ -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 {
Expand Down

0 comments on commit ffcd75b

Please sign in to comment.