From c0b08a579a99170dc412874860bb971fe1d9eeb1 Mon Sep 17 00:00:00 2001 From: Tim Beiko Date: Sun, 11 Jul 2021 23:34:51 -0700 Subject: [PATCH] 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 * Update docs/_rpc/ns-miner.md Co-authored-by: Tim Beiko Co-authored-by: Marius van der Wijden --- docs/_rpc/ns-miner.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/_rpc/ns-miner.md b/docs/_rpc/ns-miner.md index f8ca0775d5..176cf11b67 100644 --- a/docs/_rpc/ns-miner.md +++ b/docs/_rpc/ns-miner.md @@ -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]}` |