Versions in this module Expand all Collapse all v1 v1.9.2 Aug 23, 2019 v1.9.0 Jul 31, 2019 Changes in this version + type Agent interface + GetHashRate func() int64 + SetReturnCh func(chan<- *Result) + Start func() + Stop func() + Work func() chan<- *Work + type Backend interface + AccountManager func() *accounts.Manager + BlockChain func() *core.BlockChain + ChainDb func() ethdb.Database + TxPool func() *core.TxPool + type Config struct + Etherbase common.Address + ExtraData hexutil.Bytes + GasCeil uint64 + GasFloor uint64 + GasPrice *big.Int + Notify []string + Noverify bool + Recommit time.Duration + type CpuAgent struct + func NewCpuAgent(chain consensus.ChainReader, engine consensus.Engine) *CpuAgent + func (self *CpuAgent) GetHashRate() int64 + func (self *CpuAgent) SetReturnCh(ch chan<- *Result) + func (self *CpuAgent) Start() + func (self *CpuAgent) Stop() + func (self *CpuAgent) Work() chan<- *Work + type Miner struct + func New(eth Backend, config *Config, chainConfig *params.ChainConfig, ...) *Miner + func (self *Miner) HashRate() (tot int64) + func (self *Miner) Mining() bool + func (self *Miner) Pending() (*types.Block, *state.StateDB, *state.StateDB) + func (self *Miner) PendingBlock() *types.Block + func (self *Miner) Register(agent Agent) + func (self *Miner) SetEtherbase(addr common.Address) + func (self *Miner) SetExtra(extra []byte) error + func (self *Miner) SetRecommitInterval(interval time.Duration) + func (self *Miner) Start(coinbase common.Address) + func (self *Miner) Stop() + func (self *Miner) Unregister(agent Agent) + type Result struct + Block *types.Block + Work *Work + type Work struct + Block *types.Block