Versions in this module Expand all Collapse all v0 v0.0.0 Apr 26, 2018 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 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 *params.ChainConfig, mux *event.TypeMux, ...) *Miner + func (self *Miner) HashRate() (tot int64) + func (self *Miner) Mining() bool + func (self *Miner) Pending() (*types.Block, *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) Start(coinbase common.Address) + func (self *Miner) Stop() + func (self *Miner) Unregister(agent Agent) + type RemoteAgent struct + func NewRemoteAgent(chain consensus.ChainReader, engine consensus.Engine) *RemoteAgent + func (a *RemoteAgent) GetHashRate() (tot int64) + func (a *RemoteAgent) GetWork() ([3]string, error) + func (a *RemoteAgent) SetReturnCh(returnCh chan<- *Result) + func (a *RemoteAgent) Start() + func (a *RemoteAgent) Stop() + func (a *RemoteAgent) SubmitHashrate(id common.Hash, rate uint64) + func (a *RemoteAgent) SubmitWork(nonce types.BlockNonce, mixDigest, hash common.Hash) bool + func (a *RemoteAgent) Work() chan<- *Work + type Result struct + Block *types.Block + Work *Work + type Work struct + Block *types.Block