miner
| Entity | Version |
| Source | 1.13.0-stable/generated-at:2026-09-14T07:51:25-06:00 |
| OpenRPC | 1.2.6 |
miner_setEtherbase
SetEtherbase sets the etherbase of the miner.
Params (1)
Parameters must be given by position.
1: etherbase common.Address
Result
bool
Client Method Invocation Examples
Source code
| func (api *MinerAPI) SetEtherbase(etherbase common.Address) bool {
api.e.SetEtherbase(etherbase)
return true
}// SetEtherbase sets the etherbase of the miner.
|
View on GitHub →
SetExtra sets the extra data string that is included when this miner mines a block.
Params (1)
Parameters must be given by position.
1: extra string
Result
bool
Client Method Invocation Examples
Source code
| func (api *MinerAPI) SetExtra(extra string) (bool, error) {
if err := api.e.Miner().SetExtra([ // SetExtra sets the extra data string that is included when this miner mines a block.
]byte(extra)); err != nil {
return false, err
}
return true, nil
}
|
View on GitHub →
miner_setGasLimit
SetGasLimit sets the gaslimit to target towards during mining.
Params (1)
Parameters must be given by position.
1: gasLimit hexutil.Uint64
Result
bool
Client Method Invocation Examples
Source code
| func (api *MinerAPI) SetGasLimit(gasLimit hexutil.Uint64) bool {
api.e.Miner().SetGasCeil(uint64(gasLimit))
return true
}// SetGasLimit sets the gaslimit to target towards during mining.
|
View on GitHub →
miner_setGasPrice
SetGasPrice sets the minimum accepted gas price for the miner.
Params (1)
Parameters must be given by position.
1: gasPrice hexutil.Big
Result
bool
Client Method Invocation Examples
Source code
| func (api *MinerAPI) SetGasPrice(gasPrice hexutil.Big) bool {
api.e.lock.Lock()
api.e.gasPrice = (*big.Int)(&gasPrice)
api.e.lock.Unlock()
api.e.txPool.SetGasTip((*big.Int)(&gasPrice))
api.e.Miner().SetGasTip((*big.Int)(&gasPrice))
return true
}// SetGasPrice sets the minimum accepted gas price for the miner.
|
View on GitHub →
miner_setRecommitInterval
SetRecommitInterval updates the interval for miner sealing work recommitting.
Params (1)
Parameters must be given by position.
1: interval int
Result
None
Client Method Invocation Examples
Source code
| func (api *MinerAPI) SetRecommitInterval(interval int) {
api.e.Miner().SetRecommitInterval(time.Duration(interval) * time.Millisecond)
}// SetRecommitInterval updates the interval for miner sealing work recommitting.
|
View on GitHub →
miner_start
Start starts the miner with the given number of threads. If threads is nil, the number of workers started is equal to the number of logical CPUs that are usable by this process. If mining is already running, this method adjust the number of threads allowed to use and updates the minimum price required by the transaction pool.
Params (1)
Parameters must be given by position.
1: threads *int
Result
None
Client Method Invocation Examples
Source code
| func (api *MinerAPI) Start(threads *int) error {
if threads == nil {
return api.e.StartMining(runtime.NumCPU())
}
return api.e.StartMining(*threads)
}// Start starts the miner with the given number of threads. If threads is nil,
// the number of workers started is equal to the number of logical CPUs that are
// usable by this process. If mining is already running, this method adjust the
// number of threads allowed to use and updates the minimum price required by the
// transaction pool.
|
View on GitHub →
miner_stop
Stop terminates the miner, both at the consensus engine level as well as at the block creation level.
Params (0)
None
Result
None
Client Method Invocation Examples
Source code
| func (api *MinerAPI) Stop() {
api.e.StopMining()
}// Stop terminates the miner, both at the consensus engine level as well as at
// the block creation level.
|
View on GitHub →