Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockProposer ¶
BlockProposer propose several block in specified time range
func NewBlockProposer ¶
func NewBlockProposer(c *protocol.Chain, accountManager *account.Manager, txPool *protocol.TxPool, dispatcher *event.Dispatcher) *BlockProposer
NewBlockProposer returns a new instance of a block proposer for the provided configuration. Use Start to begin the proposal process. See the documentation for BlockProposer type for more details.
func (*BlockProposer) IsProposing ¶
func (b *BlockProposer) IsProposing() bool
IsProposing returns whether the block proposer has been started.
This function is safe for concurrent access.
func (*BlockProposer) Start ¶
func (b *BlockProposer) Start()
Start begins the block propose process as well as the speed monitor used to track hashing metrics. Calling this function when the block proposer has already been started will have no effect.
This function is safe for concurrent access.
func (*BlockProposer) Stop ¶
func (b *BlockProposer) Stop()
Stop gracefully stops the proposal process by signalling all workers, and the speed monitor to quit. Calling this function when the block proposer has not already been started will have no effect.
This function is safe for concurrent access.