Documentation ¶
Index ¶
- type API
- type Miner
- func (miner *Miner) APIs(chain consensus.IChainReader) []rpc.API
- func (miner *Miner) Mining() bool
- func (miner *Miner) SetCoinbase(name string, privKeys []string) error
- func (miner *Miner) SetDelayDuration(delayDuration uint64) error
- func (miner *Miner) SetExtra(extra []byte) error
- func (miner *Miner) Start(force bool) bool
- func (miner *Miner) Stop() bool
- type Work
- type Worker
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 exposes miner related methods for the RPC interface.
func (*API) SetCoinbase ¶
SetCoinbase bind miner name & privkey of node
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
Miner creates blocks and searches for proof values.
func (*Miner) APIs ¶
func (miner *Miner) APIs(chain consensus.IChainReader) []rpc.API
APIs provide the miner RPC API.
func (*Miner) SetCoinbase ¶
SetCoinbase coinbase name & private key
func (*Miner) SetDelayDuration ¶
SetDelayDuration delay broacast block when mint block (unit:ms)
type Worker ¶
type Worker struct { consensus.IConsensus // contains filtered or unexported fields }
Worker is the main object which takes care of applying messages to the new state
Click to show internal directories.
Click to hide internal directories.