Documentation ¶
Index ¶
- type API
- func (api *API) GetHashrate() uint64
- func (api *API) SetEtherbase(etherbase common.Address) bool
- func (api *API) SetExtra(extra string) (bool, error)
- func (api *API) SetGasLimit(gasLimit hexutil.Uint64) bool
- func (api *API) SetGasPrice(gasPrice hexutil.Big) bool
- func (api *API) Start(threads *int) error
- func (api *API) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is the miner prefixed set of APIs in the Miner JSON-RPC spec.
func NewMinerAPI ¶
NewMinerAPI creates an instance of the Miner API.
func (*API) GetHashrate ¶
GetHashrate returns the current hashrate for local CPU miner and remote miner. Unsupported in Treasurenet
func (*API) SetEtherbase ¶
SetEtherbase sets the etherbase of the miner
func (*API) SetExtra ¶
SetExtra sets the extra data string that is included when this miner mines a block. Unsupported in Treasurenet
func (*API) SetGasLimit ¶
SetGasLimit sets the gaslimit to target towards during mining. Unsupported in Treasurenet
func (*API) SetGasPrice ¶
SetGasPrice sets the minimum accepted gas price for the miner. NOTE: this function accepts only integers to have the same interface than go-eth to use float values, the gas prices must be configured using the configuration file
func (*API) 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. Unsupported in Treasurenet