Versions in this module Expand all Collapse all v1 v1.0.1 Dec 19, 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 + IsMining func() bool + Miner func() *Miner + SideBlockChain func(appId string) (*core.BlockChain, bool) + SideTxPool func(appId string) *core.TxPool + 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) GetEngine() consensus.Engine + func (self *Miner) GetIsPassive() bool + 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) SetAppId(id string) + func (self *Miner) SetEtherbase(addr common.Address) + func (self *Miner) SetExtra(extra []byte) error + func (self *Miner) SetIsPassive(s bool) + func (self *Miner) Start(coinbase common.Address, id string) + 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