Skip to content

Commit

Permalink
Only add gasLimit to header after GFork
Browse files Browse the repository at this point in the history
  • Loading branch information
karlb committed Jun 5, 2023
1 parent c75a48d commit 423bd2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion miner/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ func prepareBlock(w *worker) (*blockState, error) {
sysCtx: core.NewSysContractCallCtx(header, state.Copy(), w.chain),
}
b.gasPool = new(core.GasPool).AddGas(b.gasLimit)
header.GasLimit = b.gasLimit
if w.chainConfig.IsGFork(header.Number) {
header.GasLimit = b.gasLimit
}

// Play our part in generating the random beacon.
if w.isRunning() && random.IsRunning(vmRunner) {
Expand Down

0 comments on commit 423bd2a

Please sign in to comment.