Documentation ¶
Index ¶
- type Backend
- type Miner
- func (self *Miner) Close()
- func (self *Miner) HashRate() uint64
- func (self *Miner) Mining() bool
- func (self *Miner) Pending() (*types.Block, *state.StateDB)
- func (self *Miner) PendingBlock() *types.Block
- func (self *Miner) SetCoinbase(addr common.Address)
- func (self *Miner) SetExtra(extra []byte) error
- func (self *Miner) Start(coinbase common.Address, blcokInterval uint64)
- func (self *Miner) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { BlockChain() *core.BlockChain TxPool() *core.TxPool }
后端包装挖掘所需的所有方法。
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
Miner创建块并搜索工作证明值。
func (*Miner) PendingBlock ¶
PendingBlock返回当前挂起的块。
注意,要访问挂起块和挂起状态 同时,请使用pending(),因为pending状态可以 在多个方法调用之间切换
func (*Miner) SetCoinbase ¶
Click to show internal directories.
Click to hide internal directories.