Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTxPoolConfig is returned when the miner's txpool is misconfigured. ErrTxPoolConfig = errors.New("txpool is misconfigured: cannot start miner") )
Functions ¶
This section is empty.
Types ¶
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
Miner produces new blocks, adds them to the chain and notifies other participants of the blocks it produces.
func NewMiner ¶
func NewMiner( txp state.TxPool, e engine.Engine, s state.State, c chain.Chain, v validator.Validator, p processor.Processor, g gossip.Gossip) *Miner
NewMiner creates a new miner that will start mining on the given chain. To stop the miner, you should cancel the input context.
Click to show internal directories.
Click to hide internal directories.