eth, miner: add RPC method to modify miner gaslimit (pre london: ceiling) (#23134)

This commit is contained in:
Martin Holst Swende
2021-07-06 10:35:39 +02:00
committed by GitHub
parent 13bc9c0c6e
commit d21a069619
4 changed files with 24 additions and 0 deletions

View File

@ -129,6 +129,12 @@ func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool {
return true
}
// SetGasLimit sets the gaslimit to target towards during mining.
func (api *PrivateMinerAPI) SetGasLimit(gasLimit hexutil.Uint64) bool {
api.e.Miner().SetGasCeil(uint64(gasLimit))
return true
}
// SetEtherbase sets the etherbase of the miner
func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool {
api.e.SetEtherbase(etherbase)