cmd, core, eth, miner: deprecate miner.gastarget flag (#23213)
This commit is contained in:
@ -897,19 +897,17 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
|
||||
header := &types.Header{
|
||||
ParentHash: parent.Hash(),
|
||||
Number: num.Add(num, common.Big1),
|
||||
GasLimit: core.CalcGasLimit(parent.GasUsed(), parent.GasLimit(), w.config.GasFloor, w.config.GasCeil),
|
||||
GasLimit: core.CalcGasLimit(parent.GasLimit(), w.config.GasCeil),
|
||||
Extra: w.extra,
|
||||
Time: uint64(timestamp),
|
||||
}
|
||||
// Set baseFee and GasLimit if we are on an EIP-1559 chain
|
||||
if w.chainConfig.IsLondon(header.Number) {
|
||||
header.BaseFee = misc.CalcBaseFee(w.chainConfig, parent.Header())
|
||||
parentGasLimit := parent.GasLimit()
|
||||
if !w.chainConfig.IsLondon(parent.Number()) {
|
||||
// Bump by 2x
|
||||
parentGasLimit = parent.GasLimit() * params.ElasticityMultiplier
|
||||
parentGasLimit := parent.GasLimit() * params.ElasticityMultiplier
|
||||
header.GasLimit = core.CalcGasLimit(parentGasLimit, w.config.GasCeil)
|
||||
}
|
||||
header.GasLimit = core.CalcGasLimit1559(parentGasLimit, w.config.GasCeil)
|
||||
}
|
||||
// Only set the coinbase if our consensus engine is running (avoid spurious block rewards)
|
||||
if w.isRunning() {
|
||||
|
Reference in New Issue
Block a user