Add miner_setGasLimit (#23175)

* Add miner_setGasLimit

Format copied from miner_setGasPrice

* Update docs/_rpc/ns-miner.md

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* Update docs/_rpc/ns-miner.md

Co-authored-by: Tim Beiko <t.beiko23@gmail.com>

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
Tim Beiko
2021-07-11 23:34:51 -07:00
committed by GitHub
parent 5fbb98097f
commit c0b08a579a

View File

@ -70,3 +70,13 @@ Sets the etherbase, where mining rewards will go.
| Go | `miner.SetEtherbase(common.Address) bool` |
| Console | `miner.setEtherbase(address)` |
| RPC | `{"method": "miner_setEtherbase", "params": [address]}` |
### miner_setGasLimit
Sets the gas limit the miner will target when mining. Note: on networks where EIP-1559 is activated, this should be set to twice what you want the gas target (i.e. the effective gas used on average per block) to be.
| Client | Method invocation |
|:--------|-------------------------------------------------------------|
| Go | `miner.SetGasLimit(number *rpc.HexNumber) bool` |
| Console | `miner.SetGasLimit(number)` |
| RPC | `{"method": "miner_setGasLimit", "params": [number]}` |