Documentation ¶
Index ¶
- type API
- type HashItem
- type SpowEngine
- func (engine *SpowEngine) APIs(chain consensus.ChainReader) []rpc.API
- func (engine *SpowEngine) MSeal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, ...) error
- func (engine *SpowEngine) MStartMining(block *types.Block, seed uint64, min uint64, max uint64, ...)
- func (engine *SpowEngine) Prepare(reader consensus.ChainReader, header *types.BlockHeader) error
- func (engine *SpowEngine) Seal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, ...) error
- func (engine *SpowEngine) SetThreads(threads int)
- func (engine *SpowEngine) VerifyHeader(reader consensus.ChainReader, header *types.BlockHeader) error
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
}
func (*API) GetThreads ¶
GetThreads returns the thread number of the miner engine
type SpowEngine ¶
type SpowEngine struct {
// contains filtered or unexported fields
}
Engine provides the consensus operations based on SPOW.
func NewSpowEngine ¶
func NewSpowEngine(threads int, folder string) *SpowEngine
func (*SpowEngine) APIs ¶
func (engine *SpowEngine) APIs(chain consensus.ChainReader) []rpc.API
func (*SpowEngine) MSeal ¶
func (engine *SpowEngine) MSeal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, results chan<- *types.Block) error
func (*SpowEngine) MStartMining ¶
func (*SpowEngine) Prepare ¶
func (engine *SpowEngine) Prepare(reader consensus.ChainReader, header *types.BlockHeader) error
func (*SpowEngine) Seal ¶
func (engine *SpowEngine) Seal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, results chan<- *types.Block) error
func (*SpowEngine) SetThreads ¶
func (engine *SpowEngine) SetThreads(threads int)
func (*SpowEngine) VerifyHeader ¶
func (engine *SpowEngine) VerifyHeader(reader consensus.ChainReader, header *types.BlockHeader) error
ValidateHeader validates the specified header and returns error if validation failed.
Click to show internal directories.
Click to hide internal directories.